Commit graph

4646 commits

Author SHA1 Message Date
Treehugger Robot
5a1a88ee93 Merge "LinuxBionic supports arm64" 2020-09-14 15:59:16 +00:00
Colin Cross
a018b3df16 Merge "Use alias for test_per_src apex dependencies" 2020-09-12 20:21:36 +00:00
Colin Cross
2c033610e2 Make generated library SDK snapshots determinstic
Sort the include dir properties before printing them out of a map.

Test: m checkbuild
Change-Id: Ia924158755983631259ef0b53c369666de4e1d23
2020-09-11 23:10:39 +00:00
Colin Cross
90dab3498d Use alias for test_per_src apex dependencies
AddFarVariationDependencies was broken, which allowed apex to add
dependencies on tests by requesting an empty test_per_src variation
even though some test dependencies did not have a test_per_src
variation.  Add an alias from the pre-test_per_src variation
variant to the empty test_per_src variation, and drop the
test_per_src variation when requesting the depencency.

Test: TestApexWithTests
Change-Id: I2ed7bdd761027956141e25d4d81f9074afe628b6
2020-09-11 16:02:24 -07:00
Treehugger Robot
05175c405b Merge "Propagate recovery_available property through to sdk snapshot" 2020-09-11 21:16:07 +00:00
Paul Duffin
d6abaa71f8 Propagate recovery_available property through to sdk snapshot
Needed for jni_headers which is marked as recovery_available because libchrome
is also marked and that library is used by others that are the recovery
partition. There may be other dependency paths that require jni_headers to be
recovery_available that was just the first one found.

Bug: 168301990
Test: m nothing
Change-Id: I916ecfe7700b9c153b29115e849da148fc7e7a76
2020-09-11 16:09:28 +01:00
Yifan Hong
c2c2d4e716 Merge "Sanitize APEX module name properly." 2020-09-11 00:25:29 +00:00
Pirama Arumuga Nainar
0710d8e1cc Merge "Set -fsjlj-exceptions for all 32-bit Windows compiles" 2020-09-10 20:41:41 +00:00
Xin Li
80dc4f137a Merge "Merge Android R" 2020-09-10 17:22:09 +00:00
Pirama Arumuga Nainar
af68337d36 Set -fsjlj-exceptions for all 32-bit Windows compiles
Bug: http://b/116784799

Previously this was set only when stl was requested.  We can now pass
this for all C++ compilations.

Test: go/android-llvm-windows-testing
Change-Id: I43e635ff50d0f1a5e000f13021506aeece368b4a
2020-09-10 09:33:22 -07:00
Kousik Kumar
3e0b9c031c Merge "Check UseRBE is set before replacing any template with the RE version." 2020-09-10 09:24:17 +00:00
Yifan Hong
f2ede7a137 Sanitize APEX module name properly.
An APEX module name, unlike the APEX package name, can contain
characters like '-', which are not allowed as C define strings.
Sanitize it properly.

Test: build GKI APEX
Change-Id: I8257d43c55862da8fab7f1e342c2d14369d1211e
2020-09-09 18:49:24 -07:00
Jiyong Park
4afa2e2682 LinuxBionic supports arm64
LinuxBionic now supports arm64 architecture in addition to the existing
x86_64 arch. This is to make it possible to build host tools like adb,
fastboot, crosvm, etc. for Linux/ARM on regular Linux/x86 machines.

The arm64 target can be selected in various ways in Android.bp files:

   - target.host (because this is still considered as a host target)
   - target.linux (provided that the module is also enabled for host)
   - target.linux_bionic (use the OS name directly)
   - target.linux_bionic_arm64 (OS name + arch combo)
   - target.linux_arm64 (provided that the module is also for host)
   - target.not_windows
   - arch.arm64

The toolchain for the new target is almost the same as the toolchain
config for Android/ARM64. One notable difference is that the clang
triple is aarch64-linux instead of aarch64-linux-android, so that
__ANDROID__ is not defined for the new OS type.

Bug: 134795810
Test: HOST_CROSS_OS=linux_bionic HOST_CROSS_ARCH=arm64 m nothing

Change-Id: If4300583edfb6d75bd4d984b38f73b6a406b4447
2020-09-09 21:57:10 +09:00
kellyhung
af286f3312 Add test_mainline_module option. am: 74b00521f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402513

Change-Id: I4824247226e786363cf94815576a93da3deb73da
2020-09-09 08:06:35 +00:00
kellyhung
74b00521f8 Add test_mainline_module option.
Bug: 165425972

Test: m HelloWorldTests
Change-Id: I6e60b3895328c4f7aef0bfb30dcdefc30ee1d8ed
2020-09-09 02:15:39 +00:00
Treehugger Robot
9e1ba22f14 Merge "Add vendor snapshot usage test" am: f8123919aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1420809

Change-Id: I9b22b04a02f6b0e0fd6e76bd58a9e520e9c4d064
2020-09-09 00:05:23 +00:00
Treehugger Robot
f8123919aa Merge "Add vendor snapshot usage test" 2020-09-08 23:48:06 +00:00
Paul Duffin
4d38789695 Merge "Propagate vendor_available property through to sdk snapshot" am: 4964a5e000
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398472

Change-Id: I913a8e3cfd7eebb0a53ecd591b1bf12f69fa00b2
2020-09-07 15:20:07 +00:00
Paul Duffin
4964a5e000 Merge "Propagate vendor_available property through to sdk snapshot" 2020-09-07 14:58:20 +00:00
Inseob Kim
5f58ff7839 Add vendor snapshot usage test
In addition to capture test, this adds vendor snapshot usage test to
ensure the snapshots of BOARD_VNDK_VERSION are used correctly.

Bug: 167642944
Test: m nothing
Change-Id: I200c95626479a2b2d982edd7488d816e01376734
2020-09-07 19:56:43 +09:00
Bill Peckham
f3bf78650a Merge "Add exclude_from_vendor_snapshot property, related logic" am: e1359af34d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1416430

Change-Id: I89da13623f047a1651fb99b6a6ccc575cc75171c
2020-09-03 18:06:37 +00:00
Bill Peckham
e1359af34d Merge "Add exclude_from_vendor_snapshot property, related logic" 2020-09-03 17:52:29 +00:00
Paul Duffin
d1edbd4eed Propagate vendor_available property through to sdk snapshot
Test: m nothing
Change-Id: I68dcba111d290ae8a84c2bc023e1a4e0eaa43408
2020-09-03 18:49:35 +01:00
Yi Kong
7daf77bbc6 Merge "Revert "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO""" am: 4f78c512d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1418988

Change-Id: I73355f33044be0378e395f06f2d3b52eeed08f59
2020-09-03 07:41:57 +00:00
Yi Kong
4f78c512d4 Merge "Revert "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO""" 2020-09-03 07:25:24 +00:00
Ramy Medhat
16f23a4038 Check UseRBE is set before replacing any template with the RE version.
Test: presubmit
Change-Id: I6df58b4e700f0d231367af2710672d731d20a736
2020-09-03 01:29:49 -04:00
Treehugger Robot
cab67c0dff Merge "AutoGen: Support NativeTest with vendor namespace." am: 52ddbe25f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1399147

Change-Id: I1d18daede7426969383666263a2a3aef27a5bc37
2020-09-03 03:07:06 +00:00
Treehugger Robot
52ddbe25f9 Merge "AutoGen: Support NativeTest with vendor namespace." 2020-09-03 02:26:11 +00:00
Colin Cross
90d0500699 Merge changes I59b7a32a,Ida7bc75a am: 0329f2398c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1406259

Change-Id: I9b2b709c59630394aa528c64b4fbe60b52d50be5
2020-09-03 00:21:49 +00:00
Colin Cross
0329f2398c Merge changes I59b7a32a,Ida7bc75a
* changes:
  Only request image and version variations for device SDK dependencies
  Create os and arch variants for GoBinaryTool modules
2020-09-02 23:51:53 +00:00
Bill Peckham
945441c09a Add exclude_from_vendor_snapshot property, related logic
When building a vendor snapshot, the general rule the
build system uses to select a module for inclusion into
the vendor snapshot is if it's a framework module.
However, there are cases where a partner may modify the
framework module, thereby assuming control of that
module.

This change adds the exclude_from_vendor_snapshot
property allowing the partner to mark a module that
would normally be included in the vendor snapshot for
exclusion. This module is then built from source when
building the vendor image against the vendor snapshot.

Bug: 165705527
Test: m nothing
Test: build partner code against vendor snapshot
Change-Id: I6c5c15f13eeeb8f29717a4abd84b65fa72096889
2020-09-02 22:27:45 +00:00
Pirama Arumuga Nainar
fe1da75972 Revert "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO""
This reverts commit 988ff8d149.

Reason for revert: RBE can now handle PGO profiles during remote linking.

Bug: http://b/162702246

Test: m ANDROID_PGO_INSTRUMENT=hwui hwuimacro and check hwuimacro has
      PGO instrumentation.

Change-Id: I724b53dc086923beeb6f4b8903136545d18f4ece
2020-09-02 17:44:06 +00:00
Jooyung Han
4c92cad10e Merge commit '0703fd873fe2ed492266a4457a1e217971c2f4f0' into manual_merge_1e3d9fb376aaf1be6de1bd16a9004ccc95226ab0
Change-Id: I7115a50254e23e3f7d9cdab960c671195746978e
2020-09-02 14:19:18 +09:00
Jooyung Han
3a92fbeaff Merge "apex: support prebuilt_firmware for vendor apexes" 2020-09-02 04:17:43 +00:00
Xin Li
ca52d2ff53 Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:01:23 +00:00
Ramy Medhat
3618f0a02e Merge "Pass cpp linking implicit deps to RBE." 2020-09-01 11:19:28 +00:00
yangbill
5ec4555d22 AutoGen: Support NativeTest with vendor namespace.
Set the TEST_ROOT to /data/local/tmp/tests/vendor if LOCAL_VENDOR_MODULE or
LOCAL_USE_VNDK be set, if not, set to /data/local/tmp.

Bug: 138450837
Test: atest binderVendorDoubleLoadTest
Change-Id: I04acf12976dd24b9bf880a6775fa4f043a221001
2020-09-01 10:33:12 +08:00
Jooyung Han
0703fd873f apex: support prebuilt_firmware for vendor apexes
prebuilt_firmware module is one of many prebuilt_etc-like modules. When
it is soc-specific, it is installed in /vendor/firmware. Similarly, when
prebuilt_firmware is embeded in a vendor apex, installing it in
<apex>/firmware instead of <apex>/etc.

Bug: 162701747
Test: lunch sunfish-userdebug
      m && device boots && vibrator works
Change-Id: I00d28cde42259aaf8221e3897df77efc42b0c1ca
2020-09-01 10:45:13 +09:00
Xin Li
65cb5c69ea Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ifca7b65f4e27bf14cdc30f72f790b0de90130bae
Change-Id: I3a39be5f0b8736de4822c6a14072c78d4e4ad89d
2020-08-29 01:17:45 -07:00
Matthias Maennich
bea94d3525 Merge "soong: add support for module specific lexer flags" 2020-08-28 19:24:01 +00:00
Ramy Medhat
6797edc70e Pass cpp linking implicit deps to RBE.
Test: build with RBE_CXX=1 RBE_CXX_EXEC_STRATEGY=remote
Change-Id: Ie769b9a99f080b75c1b82e458b5220261e9c1b47
2020-08-28 14:53:44 -04:00
Bowgo Tsai
988ff8d149 Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO"
This reverts commit 5010a97388.

Reason for revert:  b/166728338 - build failures on master branch

Bug: 162702246
Bug: 166728338
Change-Id: Ie9e51e7c5533d220ad3e160439cb38ff88f068ac
Test: TreeHugger
2020-08-28 08:08:36 +00:00
Pirama Arumuga Nainar
5010a97388 [pgo] Return updated Flags after adding flags for PGO/AFDO
Bug: http://b/162702246

Test: m ANDROID_PGO_INSTRUMENT=hwui hwuimacro and check hwuimacro has
      PGO instrumentation.
Change-Id: I8044702e0aed4fa7bb9ac71608a83a95f319abd9
2020-08-27 16:28:45 -07:00
Thiébaud Weksteen
d458745f15 cc: export Stripper struct
The cc stripping logic can be reused for Rust. Export the Stripper
structure for that purpose. Extract the strip-related flags from
builderFlags into StripFlags. Add the method flagsToStripFlags
(similarly to flagsToBuilderFlags).

Add the helper method disableStripping on libraryDecorator.

Test: m
Bug: 153430439
Change-Id: I11aef1abb8d498a4c1672500a7398279edf7f548
2020-08-27 10:13:42 +02:00
Treehugger Robot
d1ac3a79e0 Merge "apex: pass "apex name" as literal to apex variants" 2020-08-27 00:01:15 +00:00
Treehugger Robot
23a6a41c66 Merge "bootstrap is added for cc_binary only when the module is in an APEX" 2020-08-26 23:28:54 +00:00
Matthias Maennich
22fd4d1b82 soong: add support for module specific lexer flags
To support module specific lexer flags, this follows the same strategy
as the yacc flags:
 - add LexProperties to the BaseCompilerProperties
 - propagate those flags to the generator generation (i.e. genLex)
 - add a placeholder for custom flags
 - replace the placeholder with the concatenated flags

This might not support escaping very well, but I figured that this is a
very edge case. Support for escaping etc. could be added later on.

Bug: 159682555
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I31a3b783bb05213fe1621191031952b41b318103
2020-08-26 21:41:33 +01:00
Colin Cross
42507337e5 Only request image and version variations for device SDK dependencies
AddFarVariationDependencies was broken, which allowed sdk modules to
request dependencies using image and version variations, even for
host modules that do not have image or version variations.  Make
the image and version variations conditional on device sdk modules.

Test: go test ./sdk
Change-Id: I59b7a32a3782254fd5feb828a5258ee13d4db812
2020-08-26 11:51:51 -07:00
Jiyong Park
89f7bf1635 bootstrap is added for cc_binary only when the module is in an APEX
Like shared libraries, the bootstrap subdirectory is appended to the
install path only when the module is in an APEX. Currently, this change
doesn't make any difference because only the Bionic binary (linker) is
satisfying the existing condition InstallToBootstrap() and it already
satisfies DirectlyInAnyApex.

However, this change makes a diference when we build the binary for the
host targets. Then without this change, it is installed to
out/soong/host/<OS>-<arch>/bin/bootstrap. This doesn't make sense
because we don't use APEXes for the host targets. With this change,
the binary is correctly installed to out/soong/host/<OS>-<arch>/bin
because DirectlyInAnyApex returns false for hosts.

Bug: 159685774
Test: m
Change-Id: I0d63bd8c11e3a96ee6a27b2295bc14d6dc15ff9e
2020-08-25 18:57:39 +09:00
Treehugger Robot
4c2e4f381a Merge "Support ninja rsp files in soong_zip" 2020-08-24 18:40:56 +00:00