Revert "Revert "Build system changes for CFI (Soong)""

This reverts commit 33c252c2f1.

I have a fix to the crashes that this CL set was causing, and have
uploaded it as a patchset to this revert.

This also contains a partial fix that was initially submitted
separately as
https://android-review.googlesource.com/#/c/platform/build/soong/+/524295/

Bug: 30227045
Test: ./art/test/testrunner/run_build_test_target.py -j110 art-asan #no
build errors
Test: m -j50 ASAN_OPTIONS=detect_leaks=0 SANITIZE_HOST=address # no
build errors

Change-Id: I3e53549fa03413d35d9a952f04de1e7629e1f06d
This commit is contained in:
Vishwath Mohan
2017-11-01 09:20:21 +00:00
parent 5c3c768187
commit b743e9c16a
4 changed files with 117 additions and 28 deletions

View File

@@ -513,6 +513,10 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext,
if versionScript.Valid() {
flags.LdFlags = append(flags.LdFlags, "-Wl,--version-script,"+versionScript.String())
linkerDeps = append(linkerDeps, versionScript.Path())
if library.sanitize.isSanitizerEnabled(cfi) {
flags.LdFlags = append(flags.LdFlags, "-Wl,--version-script,"+cfiExportsMap.String())
linkerDeps = append(linkerDeps, cfiExportsMap)
}
}
if unexportedSymbols.Valid() {
ctx.PropertyErrorf("unexported_symbols_list", "Only supported on Darwin")