Index: llvm/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/BUILD.gn +++ llvm/utils/gn/secondary/BUILD.gn @@ -22,7 +22,7 @@ "//libcxxabi", ] } - if (current_os == "linux" || current_os == "win") { + if (current_os == "linux" || current_os == "win" || current_os=="mac") { deps += [ "//compiler-rt/test/asan" ] } if (current_os == "linux" || current_os == "android") { Index: llvm/utils/gn/secondary/compiler-rt/target.gni =================================================================== --- llvm/utils/gn/secondary/compiler-rt/target.gni +++ llvm/utils/gn/secondary/compiler-rt/target.gni @@ -32,6 +32,7 @@ } } else if (current_os == "ios" || current_os == "mac") { crt_current_out_dir = "$clang_resource_dir/lib/darwin" + crt_current_target_suffix = "-$crt_current_target_arch" } else if (current_os == "baremetal") { crt_current_out_dir = "$clang_resource_dir/lib/baremetal" crt_current_target_suffix = "-$crt_current_target_arch" Index: llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn +++ llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn @@ -17,12 +17,16 @@ "ASAN_TEST_BITS=64", "ASAN_TEST_APPLE_PLATFORM=", "ASAN_TEST_MIN_DEPLOYMENT_TARGET_FLAG=", - "ASAN_TEST_DYNAMIC=0", "ASAN_TEST_TARGET_ARCH=$crt_current_target_arch", "COMPILER_RT_ARM_THUMB=", "COMPILER_RT_BINARY_DIR=" + rebase_path("$root_gen_dir/compiler-rt"), "LIT_SITE_CFG_IN_HEADER=## Autogenerated from $input, do not edit", ] + if (host_os == "mac") { + values += [ "ASAN_TEST_DYNAMIC=1" ] + } else { + values += [ "ASAN_TEST_DYNAMIC=0" ] + } } if (current_toolchain != host_toolchain) { @@ -34,18 +38,23 @@ "//compiler-rt/lib/asan:ignorelist($host_toolchain)", "//compiler-rt/lib/profile", "//compiler-rt/test:lit_common_configured", + "//llvm/tools/llvm-nm($host_toolchain)", + "//llvm/tools/llvm-objdump($host_toolchain)", "//llvm/tools/llvm-readobj($host_toolchain)", + "//llvm/tools/llvm-size($host_toolchain)", "//llvm/tools/llvm-symbolizer($host_toolchain)", + "//llvm/tools/sancov($host_toolchain)", "//llvm/utils/FileCheck($host_toolchain)", "//llvm/utils/count($host_toolchain)", "//llvm/utils/llvm-lit($host_toolchain)", "//llvm/utils/not($host_toolchain)", + "//llvm/utils/split-file($host_toolchain)", ] } } supported_toolchains = [] -if (host_os == "linux") { +if (host_os == "linux" || host_os == "mac") { supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_unix" ] } else if (host_os == "win") { supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_win_x64" ]