Index: compiler-rt/test/lit.common.cfg =================================================================== --- compiler-rt/test/lit.common.cfg +++ compiler-rt/test/lit.common.cfg @@ -55,10 +55,11 @@ if config.asan_shadow_scale != '': config.target_cflags += " -mllvm -asan-mapping-scale=" + config.asan_shadow_scale -# BFD linker in 64-bit android toolchains fails to find libm.so, which is a -# transitive shared library dependency (via asan runtime). +# BFD linker in 64-bit android toolchains fails to find libc++_shared.so, which +# is a transitive shared library dependency (via asan runtime). if config.android: - config.target_cflags += " -pie -fuse-ld=gold -Wl,--enable-new-dtags" + # Prepend the flag so that it can be overridden. + config.target_cflags = "-fuse-ld=gold " + config.target_cflags config.cxx_mode_flags.append('-stdlib=libstdc++') # Clear some environment variables that might affect Clang.