diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn index dde34c1ea..60954b3dc 100644 --- a/config/compiler/BUILD.gn +++ b/config/compiler/BUILD.gn @@ -307,15 +307,6 @@ config("compiler") { cflags += [ "-fcolor-diagnostics" ] } - # Makes builds independent of absolute file path. - # clang-cl (used if is_win) doesn't expose this flag. - # Currently disabled for nacl since its toolchain lacks this flag (too old). - # TODO(zforman): Once nacl's toolchain is updated, remove check. - if (is_clang && !is_win && !is_nacl) { - absolute_path = rebase_path("//.") - cflags += [ "-fdebug-prefix-map=$absolute_path=." ] - } - # C++11 compiler flags setup. # --------------------------- if (is_linux || is_android || (is_nacl && is_clang)) { diff --git a/config/linux/pkg_config.gni b/config/linux/pkg_config.gni index 9ab1de97a..58769e269 100644 --- a/config/linux/pkg_config.gni +++ b/config/linux/pkg_config.gni @@ -52,7 +52,7 @@ if (sysroot != "") { # Pass the sysroot if we're using one (it requires the CPU arch also). pkg_config_args = [ "-s", - rebase_path(sysroot), + sysroot, "-a", current_cpu, "--system_libdir", diff --git a/config/posix/BUILD.gn b/config/posix/BUILD.gn index 1abbcebba..6f65443d7 100644 --- a/config/posix/BUILD.gn +++ b/config/posix/BUILD.gn @@ -13,7 +13,7 @@ assert(is_posix) config("runtime_library") { if (!is_mac && sysroot != "") { # Pass the sysroot to all C compiler variants, the assembler, and linker. - cflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ] + cflags = [ "--sysroot=" + sysroot ] asmflags = cflags ldflags = cflags diff --git a/config/sysroot.gni b/config/sysroot.gni index dcd215a34..29a2b6117 100644 --- a/config/sysroot.gni +++ b/config/sysroot.gni @@ -19,17 +19,17 @@ if (current_toolchain == default_toolchain && target_sysroot != "") { } else if (is_android) { import("//build/config/android/config.gni") if (current_cpu == "x86") { - sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" + sysroot = rebase_path("$android_ndk_root/$x86_android_sysroot_subdir") } else if (current_cpu == "arm") { - sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" + sysroot = rebase_path("$android_ndk_root/$arm_android_sysroot_subdir") } else if (current_cpu == "mipsel") { - sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" + sysroot = rebase_path("$android_ndk_root/$mips_android_sysroot_subdir") } else if (current_cpu == "x64") { - sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" + sysroot = rebase_path("$android_ndk_root/$x86_64_android_sysroot_subdir") } else if (current_cpu == "arm64") { - sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" + sysroot = rebase_path("$android_ndk_root/$arm64_android_sysroot_subdir") } else if (current_cpu == "mips64") { - sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" + sysroot = rebase_path("$android_ndk_root/$mips64_android_sysroot_subdir") } else { sysroot = "" } @@ -37,13 +37,13 @@ if (current_toolchain == default_toolchain && target_sysroot != "") { # By default build against a sysroot image downloaded from Cloud Storage # during gclient runhooks. if (current_cpu == "x64") { - sysroot = "//build/linux/debian_wheezy_amd64-sysroot" + sysroot = rebase_path("//build/linux/debian_wheezy_amd64-sysroot") } else if (current_cpu == "x86") { - sysroot = "//build/linux/debian_wheezy_i386-sysroot" + sysroot = rebase_path("//build/linux/debian_wheezy_i386-sysroot") } else if (current_cpu == "mipsel") { - sysroot = "//build/linux/debian_wheezy_mips-sysroot" + sysroot = rebase_path("//build/linux/debian_wheezy_mips-sysroot") } else if (current_cpu == "arm") { - sysroot = "//build/linux/debian_wheezy_arm-sysroot" + sysroot = rebase_path("//build/linux/debian_wheezy_arm-sysroot") } else { # Any other builds don't use a sysroot. sysroot = "" @@ -63,9 +63,7 @@ if (current_toolchain == default_toolchain && target_sysroot != "") { _script_arch = "amd64" } assert( - exec_script("//build/dir_exists.py", - [ rebase_path(sysroot) ], - "string") == "True", + exec_script("//build/dir_exists.py", [ sysroot ], "string") == "True", "Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=$_script_arch") } } else if (is_mac) {