[PATCH] D24156: [CMake] Explicitly add --target option to compiler flags

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 10:43:16 PDT 2016


fjricci requested changes to this revision.
fjricci added a comment.
This revision now requires changes to proceed.

I think this is a good patch (and simplifies cmake invocations for sure).

However, our use of `COMPILER_RT_DEFAULT_TARGET_TRIPLE` isn't entirely consistent with the `--target` expected by clang.

Two particular cases that come to mind for me are linux arm related.

For linux arm with soft float, we expect `armv7-linux-gnueabi` as `--target`, but `arm-linux-gnueabi` when parsing `COMPILER_RT_DEFAULT_TARGET_TRIPLE`.
For linux arm with hard float, we expect `armv7-linux-gnueabihf` as `--target`, but `armhf-linux-gnueabi` when parsing `COMPILER_RT_DEFAULT_TARGET_TRIPLE`.

`androideabi` has an analagous issue, and I've also seen issues on Linux with `i386` vs `i686`.

I'm not sure how much re-working of the build is required to make thing consistent in all cases, but I do think that the consistency would be a good thing to have.


https://reviews.llvm.org/D24156





More information about the llvm-commits mailing list