diff options
author | Vishwath Mohan <vishwath@google.com> | 2017-02-14 07:59:33 -0800 |
---|---|---|
committer | Vishwath Mohan <vishwath@google.com> | 2017-02-15 12:46:52 -0800 |
commit | f3918d37fb69ca442347ec3150b1b6e03dd1d61f (patch) | |
tree | 75a458d6250cc8f27a58c4cc5685952e6f73caf2 /cc/makevars.go | |
parent | e13374d3c1e33176ac229317505c5e2b4d8d5240 (diff) | |
download | build_soong-f3918d37fb69ca442347ec3150b1b6e03dd1d61f.tar.gz build_soong-f3918d37fb69ca442347ec3150b1b6e03dd1d61f.tar.bz2 build_soong-f3918d37fb69ca442347ec3150b1b6e03dd1d61f.zip |
Blacklist code for CFI.
Adds the -fsanitize-blacklist option for CFI, using the built in
blacklist at external/compiler-rt/lib/cfi/cfi_blacklist.txt.
Also refactors the CFI cflags and ldflags into cc/makevars.go to
ensure they're consistent across Soong and make projects.
Bug: 30227045
Test: ENABLE_CFI=true m -j40 builds and boots.
Test: The blacklist prevents runtime errors that otherwise occur.
Change-Id: I91c5420478e7290061d89338a86abdef69c67fe2
Diffstat (limited to 'cc/makevars.go')
-rw-r--r-- | cc/makevars.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/makevars.go b/cc/makevars.go index 06b57c94..e4d8fe61 100644 --- a/cc/makevars.go +++ b/cc/makevars.go @@ -64,6 +64,9 @@ func makeVarsProvider(ctx android.MakeVarsContext) { ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS", asanLdflags) ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES", asanLibs) + ctx.Strict("CFI_EXTRA_CFLAGS", cfiCflags) + ctx.Strict("CFI_EXTRA_LDFLAGS", cfiLdflags) + ctx.Strict("DEFAULT_C_STD_VERSION", config.CStdVersion) ctx.Strict("DEFAULT_CPP_STD_VERSION", config.CppStdVersion) ctx.Strict("DEFAULT_GCC_CPP_STD_VERSION", config.GccCppStdVersion) |