From b875ccdae16f068c747c90b01018a3ae99d5cc7e Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 26 Oct 2020 10:08:31 -0700 Subject: [PATCH] Switch to -fdebug-compilation-dir This removes some argument parsing from wrapped_clang. This flag was introduced in clang 9. --- tools/osx/crosstool/cc_toolchain_config.bzl | 2 +- tools/osx/crosstool/wrapped_clang.cc | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/osx/crosstool/cc_toolchain_config.bzl b/tools/osx/crosstool/cc_toolchain_config.bzl index f8691cb41c4777..29296be9a1f0c5 100644 --- a/tools/osx/crosstool/cc_toolchain_config.bzl +++ b/tools/osx/crosstool/cc_toolchain_config.bzl @@ -5370,7 +5370,7 @@ def _impl(ctx): ACTION_NAMES.objc_compile, ACTION_NAMES.objcpp_compile, ], - flag_groups = [flag_group(flags = ["DEBUG_PREFIX_MAP_PWD=."])], + flag_groups = [flag_group(flags = ["-fdebug-compilation-dir", "."])], ), ], ) diff --git a/tools/osx/crosstool/wrapped_clang.cc b/tools/osx/crosstool/wrapped_clang.cc index 4463540ad57ecd..2f2bbbed465b36 100644 --- a/tools/osx/crosstool/wrapped_clang.cc +++ b/tools/osx/crosstool/wrapped_clang.cc @@ -217,9 +217,6 @@ int main(int argc, char *argv[]) { std::ofstream bitcode_symbol_map_file(bitcode_symbol_map); arg = bitcode_symbol_map; } - if (SetArgIfFlagPresent(arg, "DEBUG_PREFIX_MAP_PWD", &dest_dir)) { - arg = "-fdebug-prefix-map=" + std::string(cwd.get()) + "=" + dest_dir; - } if (arg.compare("OSO_PREFIX_MAP_PWD") == 0) { arg = "-Wl,-oso_prefix," + std::string(cwd.get()) + "/"; }