NDK r19 includes a sysroot that can be used directly by the compiler
without creating a standalone toolchain, so we just need a handful
of flags to point Clang there.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 27721 Build 27720: arc lint + arc unit
Event Timeline
Nice!
Do you know if we do this in chrome already?
llvm/utils/gn/build/toolchain/target_flags.gni | ||
---|---|---|
11 | What do we need the -B for btw? We use integrated-as and everything, right? |
Chrome is on r16 and doesn't use standalone toolchains, and I believe that it's doing something very similar to what we used to be doing here (e.g. https://cs.chromium.org/chromium/src/build/config/android/config.gni?type=cs&q=4%5C.9%5C.x&sq=package:chromium&g=0&l=319 to find libgcc).
llvm/utils/gn/build/toolchain/target_flags.gni | ||
---|---|---|
11 | The -B is needed to let the driver find libgcc which lives in a target-specific directory under toolchains/llvm/prebuilt/linux-x86_64/lib/gcc. I don't think it's used for anything else. It looks it would have also worked to put libgcc in the sysroot (e.g. the aarch64 one could have lived in toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android), then there would be no need to pass -B as well. In fact if I try copying libgcc there and remove the -B here then I can still compile and link things and check-hwasan still passes. @danalbert do you know why it wasn't done that way? |
What do we need the -B for btw? We use integrated-as and everything, right?