From fdca0741b22a4dddbf1808b8d0081651662b22c5 Mon Sep 17 00:00:00 2001 From: zforman Date: Tue, 19 Jan 2016 21:19:20 -0800 Subject: clang: Makes builds with clang less dependent on absolute file path [Note: Dependency claims are only valid on Linux builds] This change removes absolute file paths from several locations in produced binaries, reducing the total number of files containing absolute file paths from ~30k to ~4k. Specifically, this removes absolute paths from: .rodata (sysroot based) .debug_str, .debug_info (debug prefix based) .debug_line (debug prefix and sysroot based) .debug_info still contains (on Linux) 22 absolute paths, but as discussed below, this is most likely simple to resolve. This can be measured by using $ find out/Default/ -type f | grep -v ninja | xargs -I '{}' grep -l \ 'absolute-path-component' '{}' | wc -l Before: 30420 After: 3917 (https://gist.github.com/anonymous/fd870076c990fcf792c7) The remaining instances mostly originate from NaCL not having the flag enabled. Enabling requires updating the toolchain's version of clang to newer than release 3.8 Generated ninja files still have some absolute file paths. At the very least, they contain -fdebug-prefix-map=/ABSOLUTE/PATH/TO/DIR. This will be removed later. BUG=439949 Review URL: https://codereview.chromium.org/1556923002 Cr-Commit-Position: refs/heads/master@{#370320} --- printing/BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'printing') diff --git a/printing/BUILD.gn b/printing/BUILD.gn index 45dfcc8..3b05be4 100644 --- a/printing/BUILD.gn +++ b/printing/BUILD.gn @@ -131,7 +131,7 @@ component("printing") { cups_version = exec_script("cups_config_helper.py", [ "--api-version", - sysroot, + rebase_path(sysroot), ], "trim string") @@ -254,7 +254,7 @@ if (use_cups) { libs = exec_script("cups_config_helper.py", [ "--libs-for-gn", - sysroot, + rebase_path(sysroot), ], "value") } -- cgit v1.1