Skip to content

Commit b98ad94

Browse files
[flang] Merge flang-compiler/f18
This is the initial merge of flang-compiler, which is done in this way principally to preserve the history and git-blame, without generating a large number of commits on the first-parent history of LLVM. If you don't care about the flang history during a bisect remember that you can supply paths to git-bisect, e.g. `git bisect start clang llvm`. The history of f18 was rewritten to: * Put the code under /flang/. * Linearize the history. * Rewrite commit messages so that issue and PR numbers point to the old repository. Credit to Peter Waller for writing the flatten and merge script. Updates: flang-compiler/f18#876 (submission into llvm-project) Mailing-list: http://lists.llvm.org/pipermail/llvm-dev/2020-January/137989.html ([llvm-dev] Flang landing in the monorepo - next Monday!) Mailing-list: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137661.html ([llvm-dev] Flang landing in the monorepo) Co-authored-by: Peter Waller <[email protected]>
2 parents d081054 + 55d5e6c commit b98ad94

File tree

822 files changed

+134445
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

822 files changed

+134445
-0
lines changed

flang/.clang-format

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
3+
BasedOnStyle: LLVM
4+
AlignAfterOpenBracket: DontAlign
5+
AlignEscapedNewlines: DontAlign
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignOperands: false
9+
AlignTrailingComments: false
10+
IncludeCategories:
11+
- Regex: '^<'
12+
Priority: 4
13+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
14+
Priority: 3
15+
- Regex: '^"(flang|\.\.)/'
16+
Priority: 2
17+
- Regex: '.*'
18+
Priority: 1
19+
...
20+
21+
# vim:set filetype=yaml:

flang/.drone.star

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
def clang(arch):
2+
return {
3+
"kind": "pipeline",
4+
"name": "%s-clang" % arch,
5+
"steps": [
6+
{
7+
"name": "test",
8+
"image": "ubuntu",
9+
"commands": [
10+
"apt-get update && apt-get install -y clang-8 cmake ninja-build lld-8 llvm-8-dev libc++-8-dev libc++abi-8-dev libz-dev git",
11+
"git clone --depth=1 -b f18 https://github.com/flang-compiler/f18-llvm-project.git llvm-project",
12+
"mkdir llvm-project/build && cd llvm-project/build",
13+
'env CC=clang-8 CXX=clang++-8 CXXFLAGS="-stdlib=libc++" LDFLAGS="-fuse-ld=lld" cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=On -DLLVM_ENABLE_PROJECTS="mlir" ../llvm',
14+
"ninja install",
15+
"cd ../..",
16+
"mkdir build && cd build",
17+
'env CC=clang-8 CXX=clang++-8 CXXFLAGS="-UNDEBUG -stdlib=libc++" LDFLAGS="-fuse-ld=lld" cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. -DLLVM_DIR=/drone/src/llvm-project/install/lib/cmake/llvm -DMLIR_DIR=/drone/src/llvm-project/install/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=/drone/src/llvm-project/build/bin/llvm-lit',
18+
"ninja -j8",
19+
"ctest --output-on-failure -j24",
20+
"ninja check-all",
21+
],
22+
},
23+
],
24+
25+
}
26+
27+
def gcc(arch):
28+
return {
29+
"kind": "pipeline",
30+
"name": "%s-gcc" % arch,
31+
"steps": [
32+
{
33+
"name": "test",
34+
"image": "gcc",
35+
"commands": [
36+
"apt-get update && apt-get install -y cmake ninja-build llvm-dev libz-dev git",
37+
"git clone --depth=1 -b f18 https://github.com/flang-compiler/f18-llvm-project.git llvm-project",
38+
"mkdir llvm-project/build && cd llvm-project/build",
39+
'env CC=gcc CXX=g++ LDFLAGS="-fuse-ld=gold" cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=On -DLLVM_ENABLE_PROJECTS="mlir" ../llvm',
40+
"ninja install",
41+
"cd ../..",
42+
"mkdir build && cd build",
43+
'env CC=gcc CXX=g++ CXXFLAGS="-UNDEBUG" LDFLAGS="-fuse-ld=gold" cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. -DLLVM_DIR=/drone/src/llvm-project/install/lib/cmake/llvm -DMLIR_DIR=/drone/src/llvm-project/install/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=/drone/src/llvm-project/build/bin/llvm-lit',
44+
"ninja -j8",
45+
"ctest --output-on-failure -j24",
46+
"ninja check-all",
47+
],
48+
},
49+
],
50+
51+
}
52+
53+
def main(ctx):
54+
return [
55+
clang("amd64"),
56+
clang("arm64"),
57+
gcc("amd64"),
58+
gcc("arm64"),
59+
]
60+

flang/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Debug
2+
Release
3+
MinSizeRel
4+
build
5+
root
6+
tags
7+
TAGS
8+
*.o
9+
.nfs*
10+
*.sw?
11+
*~
12+
*#
13+
CMakeCache.txt
14+
*/CMakeFiles/*
15+
*/*/CMakeFiles/*
16+
*/Makefile
17+
*/*/Makefile
18+
cmake_install.cmake
19+
formatted
20+
.DS_Store
21+
.vs_code

0 commit comments

Comments
 (0)