Commit Graph

9754 Commits

Author SHA1 Message Date
Treehugger Robot 4c3a4aded3 Merge changes from topic "hiddenapi"
* changes:
  Move hiddenapi singleton rules to Soong
  Add MissingDeps to RuleBuilder
2019-02-07 07:27:33 +00:00
Dan Willemsen 62b9cf952c Update NDK library list
Apparently this isn't autogenerated based on the list of ndk_library
modules?

Fixes: 124019854
Test: try to use libsync from a cc_library with sdk_version: "current"
Change-Id: I5016e1b7d77ed9255bf4b185c168efe8d0b73d12
2019-02-06 18:41:27 -08:00
Dan Willemsen 155d17c1da Return early after NDK->non-NDK library link error
Otherwise the code after this assumes that the "to" library is an NDK
library and panics when it isn't.

Bug: 124019854
Test: trigger error, no longer see panic
Change-Id: I88d10e8d882285e24b4f42d0cf85c2d658348617
2019-02-06 18:30:02 -08:00
Dan Willemsen 3a984f55f6 Merge "Add BUILD_BROKEN_ENG_DEBUG_TAGS to soong.log" 2019-02-06 20:59:09 +00:00
Colin Cross f24a22a98a Move hiddenapi singleton rules to Soong
Move the rules that build hiddenapi-stubs-flags.txt,
hiddenapi-flags.csv and hiddenapi-greylist.csv into Soong.

Bug: 123645297
Test: m checkbuild
Test: m UNSAFE_DISABLE_HIDDEN_API_FLAGS=true
Change-Id: I90bf58710f6153ee8565994f799d3ec5699bc7fa
2019-02-06 11:23:40 -08:00
Jaewoong Jung e3c98e7ba4 Merge "Add prebuilt_etc_host module type." 2019-02-06 19:22:09 +00:00
Colin Cross 0d2f40ae6c Add MissingDeps to RuleBuilder
Add a method to be used when Config.AllowMissingDependencies() is true
to produce an error rule when the rule is missing dependencies.

Test: m checkbuild
Change-Id: If370fbb2734237a84a100b99b5238c7a2256c405
2019-02-06 10:59:42 -08:00
Steven Moreland 4331334bdc Merge "Remove '-b' from AIDL" 2019-02-06 18:09:31 +00:00
Elliott Hughes cc74d59a80 Switch to one-true-awk.
Test: treehugger
Change-Id: I297d21f5a463c4d3070335c7533972397014f171
2019-02-06 18:06:48 +00:00
Treehugger Robot fa8f1370fc Merge "sh_binary can be included in APEX" 2019-02-06 15:34:29 +00:00
Jiyong Park 04480cf35b sh_binary can be included in APEX
Bug: 123891899
Test: m (apex_test amended)

Change-Id: Idebe577b20019fe9cd0fb6617f3b8c52a5b87714
2019-02-06 23:09:30 +09:00
Anton Hansson 1ac44afaa5 Merge changes I28c45e13,I9754ebf0,I0dda0184
* changes:
  Export RRO resource dirs from static android_library dependencies
  Add a static lib to TestEnforceRRO
  Move TestEnforceRRO test cases into test function
2019-02-06 14:01:54 +00:00
Jiyong Park 94427265d1 Don't emit make rules for APEX files for non-installable APEX
When an APEX is non-installable, the make rules for the APEX files in
the APEX are not emitted as they will never get installed.

androidMkForType() is refactored so that make rules for the APEX files
are created in a separate function androidMkForFiles().

Test: m checkbuild tests
Bug: 123290268
Change-Id: Ibe8817d1e9c6312fb5c6f986dced8aa3e823664a
2019-02-06 22:40:29 +09:00
Jiyong Park 47e4fcb6d3 Don't emit symbol for stubs libraries
The stubs libraries are buildtime-only artifacts. Since they are not
used at runtime, no need to emit symbol files for them

Test: m
Change-Id: I54410e9289b4bf61e23581386b56ade8fba18dfa
2019-02-06 22:40:29 +09:00
Colin Cross c1c3755b39 Export RRO resource dirs from static android_library dependencies
RRO dirs from static android_library dependencies should be
included in the final module.

Bug: 123510624
Test: TestEnforceRRO
Change-Id: I28c45e139b187894a4ebc43d573eab5ea1be9861
2019-02-06 10:18:38 +00:00
Colin Cross 6ed7deaf33 Add a static lib to TestEnforceRRO
Add a static lib dependency to TestEnforceRRO in preparation
for capturing static dependencies in rroDirs.

Bug: 123510624
Test: TestEnforceRRO
Change-Id: I9754ebf02866e8b3e4ad0c55ff099e546f8e2bc2
2019-02-06 10:18:30 +00:00
Colin Cross 5c4791c71e Move TestEnforceRRO test cases into test function
The test cases will need to reference buildDir, which is not
yet set at global variable initialization time.

Bug: 123510624
Test: TestEnforceRRO
Change-Id: I0dda0184dfab496c820e11ed76b7594a60d5d587
2019-02-06 10:18:09 +00:00
Treehugger Robot cc2d11961c Merge changes Ifcb338e6,Ie509ed80,I270fed60,Id825cb75,I92a963bd
* changes:
  Prepare for a type-safe OnceKey
  Add Temporary and DeleteTemporaryFiles to RuleBuilder
  Improve RuleBuilder documentation and methods
  Allow RuleBuilder to be used with SingletonContext
  Move dexpreopt.Script to android.RuleBuilder
2019-02-06 05:09:37 +00:00
Colin Cross 571cccfcbc Prepare for a type-safe OnceKey
Add an opaque OnceKey type and use it for all calls to Once in
build/soong.  A future patch will convert the arguments to
Once* to OnceKey once users outside build/soong have been updated.

Test: onceper_test.go
Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
2019-02-06 01:52:41 +00:00
Steven Moreland 36b130fcfb Remove '-b' from AIDL
An empty file will be emitted for parcel declarations. Now sources may
inclue parcel definitions.

Bug: 70046217
Test: manual

Change-Id: I8087416ae7806399c3514d18faeadb858f07bf88
2019-02-06 01:04:29 +00:00
Jiyong Park 23c52b0eb8 :module syntax is supported for APEX even when TARGET_FLATTEN_APEX
Build rules for both flattened and non-flattend APEXes are created
regardless of TARGET_FLATTEN_APEX. The selection is made in AndroidMk.
This allows other module to reference an APEX via :module syntax
irrespective of TARGET_FLATTEN_APEX.

Bug: 123780484
Test: TARGET_FLATTEN_APEX=true m out/soong/.intermediates/art/build/apex/art-check-debug-apex-gen/gen/art-check-debug-apex-gen.dummy
with aosp/891696 applied
Change-Id: Ia49415ec3d18cfc5081461be76900c73ea803dca
2019-02-06 09:24:39 +09:00
Dan Willemsen 01f0a05361 Add BUILD_BROKEN_ENG_DEBUG_TAGS to soong.log
And add a helper script that can help parse the output from
build_test.bash

Test: check for BUILD_BROKEN_ENG_DEBUG_TAGS in soong.log
Test: go run ../build/soong/scripts/build_broken_logs.go *
Change-Id: Idd0fc8b59770dcdbe44eeba262558708a9497f96
2019-02-05 15:15:16 -08:00
Colin Cross 5cb5b093d1 Add Temporary and DeleteTemporaryFiles to RuleBuilder
Temporary marks an output path as a temporary file that is not
necessary after the rule completes, removing it from the result of
Outputs.  DeleteTemporaryFiles adds a command to the command line
that deletes all files that have been marked with Temporary.

Test: rule_builder_test.go
Change-Id: Ie509ed800992962747fb287858e148e975eee54a
2019-02-05 13:28:43 -08:00
Colin Cross 758290d7ff Improve RuleBuilder documentation and methods
Add a few convenience methods, document all the methods and add
examples that would show up in the godoc if we were to actually
generate it.

Test: rule_builder_test.go
Change-Id: I270fed605ffec34e6f5b36fde0dc9ca52694b741
2019-02-05 13:28:43 -08:00
Colin Cross 786cd6dc13 Allow RuleBuilder to be used with SingletonContext
Make RuleBuilder.Build take a subset of ModuleContext and
SingletonContext, and dynamically call PathForModuleOut only
if it is available.

Test: rule_builder_test.go
Change-Id: Id825cb75236acf187e9d4a36353a47abcac71927
2019-02-05 13:28:43 -08:00
Colin Cross feec25b084 Move dexpreopt.Script to android.RuleBuilder
Move dexpreopt.Script to android.RuleBuilder so that the builder
style can be used in more places.  Also add tests for it.

Test: rule_builder_test.go
Change-Id: I92a963bd112bf033b08899e930094b908acfcdfd
2019-02-05 13:28:43 -08:00
Dan Willemsen a55b12bec2 Merge "Stop exporting the windows toolchain to Make" 2019-02-05 20:45:27 +00:00
Kostya Kortchinsky 66b1193d55 Merge "Add option to disable Scudo globally [Soong]" 2019-02-05 14:45:39 +00:00
Jiyong Park b7c24df220 APEX respects relative_install_path
relative_install_path for cc_library is respected by APEX.

relative_install_path for cc_binary is not yet respected because doing
it will break the path to the dynamic linker in the runtime APEX.
That change should be done along with changes in init, bionic, etc.

Bug: 123721777
Test: m (apex_test.go amended)
Change-Id: I855f8eda0d4255d563861ac96d0d3e2c669e9a2a
2019-02-05 21:00:41 +09:00
Dan Willemsen dcac078c91 Turn on more warnings during CleanSpec processing
We don't want these to be warnings, may as well be errors instead of
turning off the warnings.

Bug: 123583617
Test: treehugger
Change-Id: I6ca518c9647e712426952cb88bdb044d933b23f2
2019-02-04 20:58:25 -08:00
Stephen Hines 363cab0bea Merge "Use llvm-{strip,objcopy} by default" 2019-02-05 03:13:14 +00:00
Jaewoong Jung 24788182a9 Add prebuilt_etc_host module type.
Change-Id: I667ac7325331fa2c1ecaa0f68c24bfb6d47aa8ad
Fixes: 123380976
Test: prebuilt_etc_test.go + external/parameter-framework/Schemas.mk
2019-02-04 14:48:51 -08:00
Kostya Kortchinsky d5275c8657 Add option to disable Scudo globally [Soong]
This adds an option in Soong to turn off Scudo globally.

Bug: 123228023
Test: enable Scudo for tombstoned, lunch marlin_svelte-eng && m -j, and
make sure that Scudo is not linked in
out/target/product/marlin/system/bin/tombstoned
Test: enable Scudo for tombstoned, lunch marlin-userdebug && m -j, and
make sure that Scudo is linked in
out/target/product/marlin/system/bin/tombstoned

Change-Id: I0b0992446953fc4074bde94507b66f92764c8143
Merged-In: I0b0992446953fc4074bde94507b66f92764c8143
2019-02-04 12:29:17 -08:00
Colin Cross 54956abf1f Merge changes I545a832a,I85a51b04
* changes:
  Remove empty DepsMutator methods
  Replace *[]string with []string in product variables
2019-02-04 17:38:05 +00:00
Anton Hansson 0c1fabbb32 Merge "Write out module owner for prebuilt_etc" 2019-02-04 17:35:43 +00:00
Anton Hansson ce0e258977 Write out module owner for prebuilt_etc
Translate owner: "x" into LOCAL_MODULE_OWNER := x in prebuilt_etc
rules.

Test: unit test in CL exercised with m nothing
Change-Id: Ic177b61e6f685f7a0263129a34acdf0bd46d16c2
2019-02-04 14:20:43 +00:00
Yi Kong b5c34d7f40 Use llvm-{strip,objcopy} by default
... except for Darwin Mach-O, as it is not supported by llvm-strip.

Test: m checkbuild
Bug: 119221035
Change-Id: I021637b6dd3530bff1f563f2ec7c2168e1083b7e
2019-02-04 18:20:28 +08:00
Jiyong Park a2aca28750 Use bootstrap linker for asan build
This change the asan version of
https://android-review.googlesource.com/c/platform/build/soong/+/879237

Bug: 123725034
Test: forrest run on asan_cf_x86_pasan
Test: SANITIZE_TARGET=address m init_second_stage
inspect /system/bin/init with readelf
DT_INTERP is set to /system/bin/bootstrap/linker_asan

Change-Id: I0fabe08cc63126aadec18ca8e9f2973c33411a4f
2019-02-02 13:28:57 +09:00
Colin Cross 5f692ec219 Remove empty DepsMutator methods
Add an empty DepsMutator to ModuleBase so it doesn't have to be
implemented on every module that doesn't need it.

Test: all soong tests
Change-Id: I545a832a0dbf27386d3080377a75ea482cd9ce59
2019-02-01 17:17:58 -08:00
Colin Cross a74ca046da Replace *[]string with []string in product variables
There is no need for *[]string, []string can already hold a nil
value to specify "not set".

Test: all soong tests
Change-Id: I85a51b042c12aee1565a9287d62924feeeafd486
2019-02-01 16:43:02 -08:00
Evgenii Stepanov 93c3f5368d [hwasan] Remove deprecated compiler flag (NFC)
-hwasan-with-ifunc=0 matches the default value of the flag, and there
are no plans to change that.

Test: SANITIZE_TARGET=hwaddress keeps working
Change-Id: Ie46ffa6ae3c42a9677c3a9a3b5cdc6fb62c2c2f0
2019-02-01 22:56:03 +00:00
Pirama Arumuga Nainar 42b87a2e56 Merge "Switch to clang-r349610" 2019-02-01 16:49:36 +00:00
Treehugger Robot 101d7600b2 Merge "Fix: runtime apex is not instrumented with sanitizer" 2019-02-01 05:45:22 +00:00
Jiyong Park 8222663f1b Fix: runtime apex is not instrumented with sanitizer
Fixing the problem that IsSanitizerEnabled always returns false due to
the different sanitizer names from config.SanitizerDevice() and
sanitizerType.String().

Bug: 123708856
Test: SANITIZE_TARGET=hwaddress m com.android.runtime.release
$ ls -al out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_hwasan_com.android.runtime.release/image.apex/lib | wc -l
34
$ ls -al out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_hwasan_com.android.runtime.release/image.apex/lib64 | wc -l
35
$ ls -al out/target/product/blueline/apex/com.android.runtime.release/lib | wc -l
34
$ ls -al out/target/product/blueline/apex/com.android.runtime.release/lib64 | wc -l
35

Test: inspect out/soong/build.ninja
- Variant of com.android.runtime.release is "android_common_hwasan_com.android.runtime.release"
- Dependencies of com.android.runtime.release are hwasan variants: e.g.,
  out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-2a_kryo385_core_shared_hwasan_com.android.runtime.release/libc.so

Test: ls out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_hwasan_com.android.runtime.release/image.apex/lib64/*.so  | xargs readelf -d | grep libclang_rt.hwasan | wc -l
29

Change-Id: Idbb1f68a3ea6bdd02351d6f6048c3eedb9cf32d2
2019-02-01 11:26:04 +09:00
Jiyong Park af6d895941 Add unstrippedOutputFilePath to the linker interface
Test: m
Change-Id: I85a0cbda6ebb9838451ed8c607c2087460b7b742
2019-02-01 11:04:58 +09:00
Treehugger Robot df819e6b0c Merge changes from topic "libc-bionic"
* changes:
  Give a knob to have apex ignore system-lib special cases
  Add limited target-specific configuration to apex.
2019-01-31 22:24:55 +00:00
Treehugger Robot 2ccd9b83d0 Merge "XOM dependency check skipping static binaries." 2019-01-31 21:42:42 +00:00
Treehugger Robot 2d44f104ee Merge "Expand Jiyong's apex OWNERship" 2019-01-31 21:42:38 +00:00
Dan Willemsen bfd1830c32 Merge "Add sh_binary[_host] for shell script that should be installed as executable" 2019-01-31 21:18:55 +00:00
Dan Willemsen 5e2e3ef846 Expand Jiyong's apex OWNERship
There's more to apex than just apex.go

Change-Id: I6603db10c43148c4f17fb9d3b762400472b32526
2019-01-31 18:57:00 +00:00