aboutsummaryrefslogtreecommitdiffstats
path: root/cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix sanitizer depJiyong Park2019-08-163-90/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a problem in sanitizerMutator where a module is linked with of non-sanitized variant of a lib at build-time, but is linked with the sanitized variant of the lib at run-time. This happened because, for each sanitizer type, every shared libs are split into non-sanitized and sanitized variants, and then either of the variants are suppressed from Make so that it isn't installed to the device. This change fixes the problem by NOT splitting for shared libs; only the sanitized variant is created if needed. Header libs, static libs and shared libs for a few sanitizer types (asan/fuzzer) are however split into two. This is because the static and headers libs become part of the depending module, and asan/fuzzer require that the depending module and the dependant module should be compiled for the same sanitizer. Bug: 138103882 Bug: 138426065 Test: m com.android.runtime.debug Check that libziparchive exists under both /system/apex/com.android.runtime/[lib|lib64] Merged-In: Ia447785c485c0d049e19477b32bc638bfe6f1608 (cherry picked from commit 1d1119f4bd20368dc686c6980d80a3ea34311716) Change-Id: Ia447785c485c0d049e19477b32bc638bfe6f1608
* Support require_root in auto-gen test configsDan Shi2019-07-151-7/+20
|\ | | | | | | | | | | am: 40c0afeb7c Change-Id: Icfdb4e7517948722f90af17dca4b41aa0840b86f
| * Support require_root in auto-gen test configsDan Shi2019-07-151-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | require_root is added to allow auto-generated test config to include RootTargetPreparer so the test runs with root permission. Bug: 134509111 Bug: 136633978 Test: add "require_root: true" to init_benchmarks and libpower_test build the modules, confirm the extra target preparer is added in the test configs. Change-Id: Ia07503e338935d6aa92560e7cf7b18d2a4c51243 Merged-In: Ia07503e338935d6aa92560e7cf7b18d2a4c51243
* | Allow arch-specific `symlink_preferred_arch` properties.Roland Levillain2019-06-111-1/+1
|\| | | | | | | | | | | am: 0dbeb666bc Change-Id: I28f0908b5ef8e8aaacde1bb8c80d9200fa12dd24
| * Allow arch-specific `symlink_preferred_arch` properties.Roland Levillain2019-06-071-1/+1
| | | | | | | | | | | | | | | | | | (cherry picked from commit d9bf9be00785d10be8b961843b53b004d0c600d4) Test: m Bug: 133864678 Change-Id: Ia6e62156adda2b3a51220552bbe4dab738753674 Merged-In: Ia6e62156adda2b3a51220552bbe4dab738753674
* | Teach soong not to duplicate the HWASAN runtime into each APEX.Peter Collingbourne2019-06-064-6/+29
|/ | | | | | | | | | | | | | | | | | | | | | | | When HWASAN is enabled, the runtime is conceptually part of Bionic (and mutually depends on it), so it needs to be treated in the same way as the Bionic libs. Now there are only two copies of the runtime: the one in /system/lib64/bootstrap (which won't be used by ordinary processes) and the one in the runtime APEX. This reduces the size of the HWASAN system image and fixes an issue where multiple copies of the HWASAN runtime were being loaded into 64-bit binaries in APEXes because the linker namespace for the binary is different from the one for its dependent libraries outside of APEXes. HWASAN only supports loading one copy of the runtime per process, so this was causing such binaries to crash on startup. Bug: http://b/134503977 Test: Builds Change-Id: I228896e193a035e6dfba9f6e28d0b2e12fc163ea Merged-In: I228896e193a035e6dfba9f6e28d0b2e12fc163ea (cherry picked from commit 3478bb2a7fbcaaea1326a1df4a564d7ca24056ce)
* Support using cc_prebuilt_library_shared with cc_libraryColin Cross2019-06-034-12/+176
| | | | | | | | | | | | | Allow a cc_prebuilt_library_shared to share the same name as a cc_library by always creating static and shared variants of prebuilts so that the variants of the source module are always a superset of the variants of the target module. Bug: 131709055 Test: TestPrebuilts Change-Id: I4afd6d37e6a986d08ad25aee69eca6d994febc6b Merged-In: I4afd6d37e6a986d08ad25aee69eca6d994febc6b (cherry picked from commit 33b2fb73335547e39bdad764af249f948eb43935)
* Remove libc_scudo library when building asan.Christopher Ferris2019-05-311-0/+5
| | | | | | | | | | | | | | | | Running any executable built with asan and libc_scudo results in crashes. Bug: 131810078 Test: Built the media processes with the sanitizer enabled verifying Test: that the libc_scudo.so shared library is not listed in the Test: mediaextractor and the mediaswcodec binaries. Test: Build the media processes without the sanitizer enabled verifying Test: that the libc_scudo.so shared library is listed in the Test: mediaextractor and the mediaswcodec binaries. Change-Id: Ie55a0414088787ec11d85fffcb04592ed4f23c57 Merged-In: Ie55a0414088787ec11d85fffcb04592ed4f23c57 (cherry picked from commit 753d4a69d55bf7492e3c4bf193c3a906dcb23535)
* Cut darwinStripPool from 10 to 5Colin Cross2019-05-231-2/+2
| | | | | | | | | | | Failures in strip.sh are still occurring with darwinStripPool set to 10, try 5. Bug: 132822437 Test: none Change-Id: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40 Merged-In: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40 (cherry picked from commit badf8d691f8a7d1c3c853f4aa19005826c409266)
* Limit calls to strip.sh on darwinColin Cross2019-05-201-0/+13
| | | | | | | | | | | | | | | | strip.sh can use a file descriptor per .o file when run on .a files, which can hit the system file descriptor limit on darwin. This causes failures when manay variants of libgcc_stripped are built simultaneously. Put all strip rules on darwin into a pool that limits them to 10 concurrent processes, which will limit the file descriptor usage to ~7500. Fixes: 132822437 Test: no mention of darwinStripPool in out/soong/build.ninja on linux Test: m libgcc_stripped on darwin Change-Id: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658 Merged-In: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658 (cherry picked from commit ee3ea31a244d65ecac2e5816132db311dcfe24df)
* Disable malloc fill in HWASan.Evgenii Stepanov2019-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | HWASan has a feature to fill malloc() memory with non-zero pattern. This has found a bug or two in the past, but it also keep causing hard to debug issues. The main problem is lack of diagnostics - use of pattern-initialized memory is not an immediate crash. More often than not it manifests as a subtle change in system behavior. Having MemorySanitizer on Android would be nice... This change does not affect any shipping configuration, but improves stability of testing-only SANITIZE_TARGET=hwaddress build. Bug: 132803232 Bug: 132652537 Bug: 131438232 Bug: 132810685 Test: SANITIZE_TARGET=hwasan on crosshatch successfully boots in ~100% attempt (up from ~99% currently). Change-Id: I7dcbcdf1b8a5b8556e32690327b32f04879e5db1
* Exclude libgcc_stripped wherever libgcc is excludedYi Kong2019-05-071-0/+1
| | | | | | | | | Test: manual testing Bug: 130267141 Bug: 29275768 Change-Id: Idbe82ea4a3e5cb9a9a7c194dd0a4d8a282d56c03 Merged-In: Icc0d50e403dc4a3592e5bf389101cdef129042df (cherry picked from commit 3d8792f7dd02a203a911e748d33b53609ae70e92)
* Revert "Revert "Strip libgcc to only keep fallback symbols""Yi Kong2019-05-076-12/+44
| | | | | | | | | | This reverts commit 619cd098b6008d81876f310e2d83ebf141c4061e. Test: manual testing Bug: 130267141 Change-Id: Ie156d4a3255be0ad082cda35c22bac4359852f22 Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 Exempt-From-Owner-Approval: Cherry pick
* Revert "Strip libgcc to only keep fallback symbols"Colin Cross2019-05-066-44/+12
| | | | | | | | | | This reverts commit bd475367c3dcb4478a70409c99b959ebdb117be3. Reason for revert: b/130267141 Bug: 29275768 Bug: 130267141 Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 Change-Id: Ieab56390b27240ef7f2f52a48a673809da7bcf8e
* Strip libgcc to only keep fallback symbolsYi Kong2019-05-036-12/+44
| | | | | | | | | | | | | | We use libgcc as fallback for symbols not present in libclang_rt builtins, however we didn't know what exact symbols were being used, some may not be intended to fallback. Create libgcc_stripped, which only contains unwind symbols from libgcc. Bug: 29275768 Test: bionic-unit-tests Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 (cherry picked from commit acee27cd7236554d0112001c96b9b5790c1c7097)
* Disable hwasan memory stats.Evgenii Stepanov2019-05-021-1/+1
| | | | | | | | | | | | | | | | | | Disable a debugging feature in hwasan that seems to be causing flaky selinux denials in the boot test: 05-02 12:11:11.360 1663 1663 I auditd : type=1400 audit(0.0:8): avc: denied { read } for comm="iptables-wrappe" path="/proc/1015/statm" dev="proc" ino=30968 scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netmgrd:s0 tclass=file permissive=0 I could not reproduce this locally, but this feature has no users and I've verified that things keep working without it. This does not affect any shipped product. Bug: 131438232 Bug: 112438058 Bug: 131845076 Test: crosshatch_hwasan boot test Change-Id: I08d46d19151e6d5221cdd56fd6864dae224fae25
* Switch to clang-r353983cYi Kong2019-04-191-2/+2
| | | | | | | | Test: TreeHugger Bug: 129712936 Change-Id: Ie1545f174017dbceab25a4e420c015230d74e97a Merged-In: I15f1db69de86ad8b9f2a0ae086fa2df87835948a (cherry picked from commit 09ecee7686ae773de5f657fbfcbb33e4738388e7)
* Fix: HideFromMake is not registered to llndk_* module typesJiyong Park2019-04-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | llndk_* module types are not initialized via cc.Module.Init(). As a consequence, mutated properties like HideFromMake, etc. were not registered and this caused problem when the mutated properties are set by one of the mutators like the sanitizerMutator. Specifically, both asan and non-asan variant of an llndk_header were both exported to Make although HideFromMake was set to true for the non-asan variant. Fixing this bug by explicitly registering BaseProperties struct which contains the mutated properties. Bug: 130652996 Test: Following works: $ lunch aosp_cf_x86_pasan-userdebug $ mkdir frameworks/native/test && mkdir frameworks/native/test/include $ cat > frameworks/native/test/Android.bp llndk_headers { name: "test_headers", export_include_dirs: ["include"], } ^D $ SANITIZE_TARGET='address' make Change-Id: I44e3668460448d79382617df61171b0ab5b4d98d Merged-In: I44e3668460448d79382617df61171b0ab5b4d98d
* Merge "Fix package path of android/soong/android pctx" into qt-devTreeHugger Robot2019-04-121-1/+1
|\
| * Fix package path of android/soong/android pctxColin Cross2019-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | android/soong/common was renamed to android/soong/android long ago, but the pctx package path was still "android/soong/common". This required all users of rules defined in android/soong/android to import "android/soong/android" and then pctx.Import("android/soong/common"). Bug: 130298888 Test: m checkbuild Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
* | Do not re-export _Unwind_XXX symbols.Christopher Ferris2019-04-102-1/+5
|/ | | | | | | Bug: 130267141 Test: All system shared libraries do not contain global _Unwind_XXX symbols. Change-Id: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
* Merge "Make libc_scudo always go first."Christopher Ferris2019-04-031-0/+11
|\
| * Make libc_scudo always go first.Christopher Ferris2019-04-021-0/+11
| | | | | | | | | | | | | | | | | | In addition, add Shared_libs to malloc_not_svelte. Bug: 123689570 Test: Verified that libc_scudo is first wherever it is added. Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
* | Revert "Enable lld for windows" am: 61166dc047 am: 87fd9dec38Josh Gao2019-04-024-29/+18
|\ \ | |/ |/| | | | | | | am: 2278b4ea57 Change-Id: I34146cab38c87a85b981eaa4102bab99e626298e
| * Revert "Enable lld for windows" am: 61166dc047Josh Gao2019-04-024-29/+18
| |\ | | | | | | | | | | | | | | | am: 87fd9dec38 Change-Id: I0f9345529010c691cd86af3a63c9723e740b8c64
| | * Revert "Enable lld for windows"Josh Gao2019-04-024-29/+18
| | |\ | | | | | | | | | | | | | | | | | | | | am: 61166dc047 Change-Id: Ib2088c56f593472c41efcf69ef0ae309db95cd9a
| | | * Revert "Enable lld for windows"Josh Gao2019-04-034-29/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3c21c0b1d9bab0d51100ca03aa157a1d8545c2ea. Reason for revert: appears to break AdbWinUsb.dll usage by fastboot (and adb?) Bug: http://b/129420419 Bug: http://b/110800681 Change-Id: I36d6d87f2e830e08e257ab42d470e49cdbb95819
* | | | Skip failing test on mac am: 9a4f3f7ea8 am: a9ff20226eColin Cross2019-04-021-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | am: 0c39a64d3a Change-Id: I12bedeced21bc8f8f6bba8b7ff20e7ed09cadaab
| * | | Skip failing test on mac am: 9a4f3f7ea8Colin Cross2019-04-021-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | am: a9ff20226e Change-Id: Ibd82f3d895774000a57ead77e987b2007beda076
| | * | Skip failing test on macColin Cross2019-04-021-0/+4
| | |\| | | | | | | | | | | | | | | | | | | | | am: 9a4f3f7ea8 Change-Id: Ic9475bef508ba636528d17db5e17d739a734232b
| | | * Skip failing test on macColin Cross2019-04-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests with cc_binary_host fail on mac, disable for now. Bug: 129763458 Test: TestProto Change-Id: Icea24ac6ffba4c5c047296cb3997a5efa95e16ee
* | | | Add support for protoc plugins am: fe17f6f0e8 am: 91c063cfdcColin Cross2019-04-027-71/+113
|\| | | | | | | | | | | | | | | | | | | | | | | am: 7299e418df Change-Id: I30e57f6678343f57233831775b62afa1f043a450
| * | | Add support for protoc plugins am: fe17f6f0e8Colin Cross2019-04-027-71/+113
| |\| | | | | | | | | | | | | | | | | | | | | | am: 91c063cfdc Change-Id: I7bda9f891c55b5ad4fa412952583af1e3764ffc3
| | * | Add support for protoc pluginsColin Cross2019-04-027-71/+113
| | |\| | | | | | | | | | | | | | | | | | | | | am: fe17f6f0e8 Change-Id: I7dabf4b788925fce8b477eb3c7f9e90a5f986945
| | | * Add support for protoc pluginsColin Cross2019-04-027-71/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a proto.plugin property to allow specifying a custom protoc plugin to generate the code. Fixes: 70706119 Test: m am StreamingProtoTest Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
* | | | Move proto compilation to RuleBuilder am: 19878da6a0 am: 61918685aaColin Cross2019-04-026-72/+68
|\| | | | | | | | | | | | | | | | | | | | | | | am: c8a3eb9110 Change-Id: If3922ee1900d6f3888c7291997ac49d4a939c065
| * | | Move proto compilation to RuleBuilder am: 19878da6a0Colin Cross2019-04-026-72/+68
| |\| | | | | | | | | | | | | | | | | | | | | | am: 61918685aa Change-Id: I0cbb9ae4a408e8dd8316c41c7f2f3816da951364
| | * | Move proto compilation to RuleBuilderColin Cross2019-04-026-72/+68
| | |\| | | | | | | | | | | | | | | | | | | | | am: 19878da6a0 Change-Id: I44eed0735702ea6fbef57753d8eec078ad3a131e
| | | * Move proto compilation to RuleBuilderColin Cross2019-04-026-72/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using blueprint.Rule for protoc commands was causing code duplication because there was no good way to run the same protoc for cc, java and python but then run custom source packaging steps for java and python. Move most of the code into a common function that returns a RuleBuilder, and then let java and python add their own commands at the end of the rule. Bug: 70706119 Test: All Soong tests Test: m checkbuild Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
* | | | Merge "Soong: Add synopsis to cc_prebuilt_* modules." am: 6e1c3faed5 am: ↵Patrice Arruda2019-04-021-7/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 57522e4123 am: 5a4767e5d8 Change-Id: Ieefc6c2fdf520b7ec24a9f2a014fdd39adedf5c9
| * | | Merge "Soong: Add synopsis to cc_prebuilt_* modules." am: 6e1c3faed5Patrice Arruda2019-04-021-7/+17
| |\| | | | | | | | | | | | | | | | | | | | | | am: 57522e4123 Change-Id: I5f7a326b95b51419dc0c5e80e952ec758618e74d
| | * | Merge "Soong: Add synopsis to cc_prebuilt_* modules."Patrice Arruda2019-04-021-7/+17
| | |\| | | | | | | | | | | | | | | | | | | | | am: 6e1c3faed5 Change-Id: I57ffbbe82c03113fffbc2fa766f8a4517d684cb7
| | | * Soong: Add synopsis to cc_prebuilt_* modules.Patrice Arruda2019-04-011-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added synopsis to the following modules under cc package: * cc_prebuilt_binary * cc_prebuilt_library_shared * cc_prebuilt_library_static Bug: b/128337482 Test: Generated the documentation and verified that the synopsis was added to each of the module. Change-Id: I2ec284eb600f28d5c7f00254f441a3cc5fb684cc
* | | | Merge "Restat clang linker outputs" am: 51e265c5dd am: 0a31c21da0Colin Cross2019-03-311-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | am: 50ec199881 Change-Id: Id3d9476d1e38f400012ef6ef90ae146be66ba7fa
| * | | Merge "Restat clang linker outputs" am: 51e265c5ddColin Cross2019-03-311-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | am: 0a31c21da0 Change-Id: I1673d9eba4399e26235b92b53f240d91842b1ee4
| | * | Merge "Restat clang linker outputs"Colin Cross2019-03-311-0/+2
| | |\| | | | | | | | | | | | | | | | | | | | | am: 51e265c5dd Change-Id: I7f95695550cc51a5043cecab62f7907dffe1ef82
| | | * Restat clang linker outputsColin Cross2019-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang -Wl,--out-implib doesn't update its output file if it hasn't changed, always restat the outputs. Fixes: 129553377 Test: m checkbuild && m checkbuild Change-Id: I2cb19e1b8280fd69c8a9b2143f55760ec05630f8
* | | | Include libprofile-extras to all coverage variants am: 65c95ff1fb am: 865ad54f90Pirama Arumuga Nainar2019-03-299-4/+64
|\| | | | | | | | | | | | | | | | | | | | | | | am: ef7a035152 Change-Id: If8958a71e5110651c883eee91597251845a02be5
| * | | Include libprofile-extras to all coverage variants am: 65c95ff1fbPirama Arumuga Nainar2019-03-299-4/+64
| |\| | | | | | | | | | | | | | | | | | | | | | am: 865ad54f90 Change-Id: I4afb3bf93ebda7d25957b988bf627481ad7889ca
| | * | Include libprofile-extras to all coverage variantsPirama Arumuga Nainar2019-03-299-4/+64
| | |\| | | | | | | | | | | | | | | | | | | | | am: 65c95ff1fb Change-Id: I74057c0921eaa76c8016d0bb8f81abaf0eb50ed8