-
Notifications
You must be signed in to change notification settings - Fork 8
[cpullvm] Build Arm/AArch64 Linux libraries under the same framework as RISC-V #76
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
base: qualcomm-software
Are you sure you want to change the base?
[cpullvm] Build Arm/AArch64 Linux libraries under the same framework as RISC-V #76
Conversation
qualcomm-software/embedded/patches/musl-embedded/0001-Allow-out-of-tree-builds.patch
Outdated
Show resolved
Hide resolved
...ware/embedded/patches/musl-embedded/0001-Remove-Linux-libraries-from-component_list.sh.patch
Show resolved
Hide resolved
qualcomm-software/embedded/scripts/build_riscv_linux_runtimes.sh
Outdated
Show resolved
Hide resolved
qualcomm-software/embedded/scripts/build_riscv_linux_runtimes.sh
Outdated
Show resolved
Hide resolved
574aafe to
76857a5
Compare
…as RISC-V
Arm/AArch64 now follow the same general pattern as RISC-V and are building
against our own tools (llvm tools, musl, etc.)
Note that this again isn't a 1:1 port of our old cpullvm Arm/AArch64
libraries (or what we used to do downstream) even besides the llvm/musl
changes:
* Baseline C flags used to build compiler-rt/musl/libc++ have changed
slightly--musl used to have slightly different variations, but these
have been made consistent across the projects.
* The subset of compiler-rt builtins we build for AArch64 Linux is now
slightly different--we build only the same variants as we build for
musl/libc++ (rather than sharing some of the same configs with
baremetal).
* Profile, sanitizer libraries are now building for Arm/AArch64 (they were
coincidentally disabled in cpullvm previously). There's caveats though,
see next point.
* We are disabling a few sanitizers/sanitizer-related projects in
compiler-rt due to either a) upstream issues between LLVM and musl or
b) our musl version underlying musl-embedded being particularly old. A
brief survey of the issues (see inline comments for details):
* sanitizer_common dependent projects have issues for Arm due to
disagreement about the size of time_t. I don't think this is worth
fixing, so just disable the projects.
* rtsan relies on fopencookie, which our musl-embedded is too old to
support. I don't think this is worth backporting, so disable this.
* gwp_asan relies on execinfo.h and musl (even upstream musl) does not
have this header or an equivalent. This is a known issue in upstream
LLVM. Just disable the project.
* Fix a bug (that also impacts RISC-V!) that meant the extra (non-builtins)
compiler-rt libraries weren't making it into the final install.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
76857a5 to
24ff1e0
Compare
|
FWIW, test-specific flags were also removed as part of this--we weren't running those in cpullvm anyway and there's some work that will be needed to re-enable them. So, I just discarded those flags for now (and it is in our list of TODOs for the release) |
| VARIANT_MUSL_CONFIGS["rv32imac_ilp32"]="" | ||
| VARIANT_MUSL_CONFIGS["rv64imac_lp64"]="" | ||
| VARIANT_MUSL_CONFIGS["rv64gc_lp64d"]="" | ||
| VARIANT_MUSL_CONFIGS["aarch64a"]="--quic-aarch64-optmem" |
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.
Need clarification: if quic_aarch64_optmem is not specified, do we need to still set quic-aarch64-mark-bti?
| # * For rtsan, our musl-embedded is too old to support the fopencookie | ||
| # extension, which rtsan relies on. | ||
| # * For gwp_asan, it requires execinfo.h which is a glibc-specific | ||
| # header--no musl version ships this (or an equivalent). |
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.
Double check whether we disabled rtsan in addition to gwp_asan in RISC-V build.
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.
Confirming rtsan isn't supported for riscv, so this should be ok--forgot about that earlier, sorry
| pushd "${WORKSPACE}/musl-embedded" >/dev/null | ||
| git checkout "${MUSL_PINNED_COMMIT}" | ||
| popd >/dev/null | ||
| # FIXME: once the musl-embedded changes settle, we need to bump this accordingly |
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 needs to be removed and the musl-embedded commit updated, but I don't want to mess with that until support settles.
I'm just removing this until then so that test builds are unblocked.
Arm/AArch64 now follow the same general pattern as RISC-V and are building
against our own tools (llvm tools, musl, etc.)
Note that this again isn't a 1:1 port of our old cpullvm Arm/AArch64
libraries (or what we used to do downstream) even besides the llvm/musl
changes:
slightly--musl used to have slightly different variations, but these
have been made consistent across the projects.
slightly different--we build only the same variants as we build for
musl/libc++ (rather than sharing some of the same configs with
baremetal).
coincidentally disabled in cpullvm previously). There's caveats though,
see next point.
compiler-rt due to either a) upstream issues between LLVM and musl or
b) our musl version underlying musl-embedded being particularly old. A
brief survey of the issues (see inline comments for details):
disagreement about the size of time_t. I don't think this is worth
fixing, so just disable the projects.
support. I don't think this is worth backporting, so disable this.
have this header or an equivalent. This is a known issue in upstream
LLVM. Just disable the project.
compiler-rt libraries weren't making it into the final install.