Strip the set of flags (including debug defs, -stdlib, -m32) that could be inherited from top-level LLVM build only when in-tree build is performed. This prevents libcxx from confusingly and undesiredly stripping user-supplied flags e.g. when performing packaging system controlled multi-ABI build.
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.
We always want to strip -stdlib=<foo> because it's just nonsense to enable the STL while building the STL.