diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-05-09 14:13:13 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-05-09 22:12:49 +0800 |
commit | 48f239c94faca140427afc9aa06cf356b1b6b0de (patch) | |
tree | 562563adb0d1935d7d7b0e2395b4402fc73970d0 /core/clang | |
parent | afe444a564ed72cdda792822a0c9dab57a8c9172 (diff) | |
download | build-48f239c94faca140427afc9aa06cf356b1b6b0de.zip build-48f239c94faca140427afc9aa06cf356b1b6b0de.tar.gz build-48f239c94faca140427afc9aa06cf356b1b6b0de.tar.bz2 |
Disable canonical prefixes of system headers
GCC know a few pre-defined paths (relative to its location) to
search for headers, libraries, program, etc. By default GCC prefixes
its own path(argv[0]) and calls realpath() which result in absolute
path with all symlink, . and .. removed.
It's usually good to have canonicalised paths, but absolute paths
in *.d file can cause unnecessary relinking when stale entries
in ccache cache hit
Add -no-canonical-prefixes (gcc>=4.6) and
-fno-canonical-system-headers (gcc>4.6) to disable realpath() on
prefixed paths
Change-Id: I58d739e61fb013015fb05a9c98b2132b307f915a
Diffstat (limited to 'core/clang')
-rw-r--r-- | core/clang/config.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/clang/config.mk b/core/clang/config.mk index b8f76f2..c598e7d 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -31,7 +31,8 @@ CLANG_CONFIG_UNKNOWN_CFLAGS := \ -funswitch-loops \ -Wno-psabi \ -Wno-unused-but-set-variable \ - -Wno-unused-but-set-parameter + -Wno-unused-but-set-parameter \ + -fno-canonical-system-headers # Clang flags for all host rules CLANG_CONFIG_HOST_EXTRA_ASFLAGS := |