[PATCH] D24809: [libcxx] [cmake] Stop stripping -m32 from compiler flags
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 19:06:21 PDT 2016
EricWF added a comment.
> Stop stripping -m32 from the user-supplied flags. There is no valid reason to do that, stripping it silently is thoroughly confusing and makes it impossible to do distribution multi-ABI builds without resorting to ugly hacks.
The reason for stripping it is configurations like `-DLLVM_BUILD_32_BITS=ON -DLIBCXX_BUILD_32_BITS=OFF`, where we inherit the incorrect set of flags from the LLVM parent project. I understand your frustration with this behavior but I'm not sure how else to handle that.
> Otherwise, in order to perform 32-bit builds the build scripts would have to use LIBCXX_BUILD_32_BITS. However, -m32 is only one of the many different ABI flags for different targets, and it really makes no sense to add separate CMake options for each possible -m* flag and then keep a mapping from well-known flags to the custom CMake options.
I don't see how using `-DLLVM_BUILD_32_BITS=ON` is impossible compared to using `-DCMAKE_CXX_FLAGS=-m32`, but the fact it acts differently than other ABI flags is unfortunate.
I'm not sure what the correct thing to do is. Does anybody else want to weigh in?
More information about the cfe-commits