From 0cb8757781e3ab9b4aee06483b74b46a2e4c6126 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 11 Nov 2020 08:16:54 -0800 Subject: [PATCH] Switch to -fdebug-compilation-dir This removes some argument parsing from wrapped_clang. This flag was introduced in clang 9. Closes #12354. PiperOrigin-RevId: 341833675 --- 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 a331804ce5bda1..73f585004384ee 100644 --- a/tools/osx/crosstool/cc_toolchain_config.bzl +++ b/tools/osx/crosstool/cc_toolchain_config.bzl @@ -5371,7 +5371,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()) + "/"; }