-
Notifications
You must be signed in to change notification settings - Fork 6
LLVM 13 #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLVM 13 #106
Conversation
|
|
||
| flake8_cmd = [ | ||
| "python3 -m flake8", | ||
| "{}".format("--format" if not check else ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --format flag in flake8 is not an opt-in flag to actually change the code (as flake8 does not modify the sources), instead it is used to specify a different formatter to check for style warnings.
|
|
||
|
|
||
| @task(default=True) | ||
| def build(ctx, clean=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now: inv llvm.libc [--clean]
| } | ||
|
|
||
|
|
||
| def do_llvm_build(target, clean_target=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is a common entrypoint to build the different targets in LLVM.makefile (most importantly, all or libc).
faasmtools/build.py
Outdated
| "-O3 -mno-atomics", | ||
| "-O3", | ||
| "-mno-atomics", | ||
| "-mno-simd128", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that in LLVM 13 we need to be explicit about -mno-simd128 as otherwise some targets are built with simd.
| export CC=/usr/bin/clang-10 | ||
| export CPP=/usr/bin/clang-cpp-10 | ||
| export LINK=/usr/bin/clang++-10 | ||
| export CXX=/usr/bin/clang++-13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I update this file, but I am not sure where it is used 🤔
| - name: "Set the GH workspace as a safe git directory" | ||
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
| # --- Build libraries to wasm --- | ||
| - name: "Build libc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now re-builds libc from scratch every time (as it checks-out a fresh version of llvm that tracks without build directory) so re-building in the GHA takes an outrageous amont of time (>1h).
…se cflags without simd
| @@ -1 +1,2 @@ | |||
| ffi_call | |||
| ffi_prep_closure_loc | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is neeeded to build ctypes statically in CPython
Other than bumping the LLVM version, this PR also homogeneises the way we build LLVM targets. The main difference with how we did it before is that now, to re-build
libcinstead of going directly towasi-libcand runningmakewe runmake libcfrom thellvm-projectsubmodule. Under the hood, this does the same:cds towasi-libcandmake, but it means that we now can rely onLLVM.makefileas the single source of truth.This has one disadvantage, which is that we need to clone
llvm-projectif we want to re-buildlibc(e.g. incpp-sysroot) but cloning is never too bad in terms of execution time.See faasm/faasm#705 for the bigger picture.
Closes #90