Commit graph

4651 commits

Author SHA1 Message Date
Colin Cross
dbff8bfd08 Add hostdex support
am: 92430106c3

Change-Id: I1d3343f74b0f0839234ae747207dc1c3b3601f90
2017-10-10 21:59:53 +00:00
Pirama Arumuga Nainar
3f5bb9c89b Refactor methods to be on PgoProperties struct
These methods only need the 'PgoProperties' struct.  Avoid the extra
indirection by directly using this struct.

Test: Build modules with PGO property.
Change-Id: I1923ebde4b0d546810de8e696514d218b3a4f54b
2017-10-10 10:58:37 -07:00
Colin Cross
92430106c3 Add hostdex support
If hostdex: true is specified for a java library, create an extra
Make module that copies the dex jar to a module with a -hostdex
suffix in the host output directory.

Bug: 67600882
Test: m -j checkbuild
Change-Id: I859dfaabeefdca714b566de94e00f74e03c85939
2017-10-10 08:02:20 -07:00
Jiyong Park
82e2bf3b7f vendor_available:false hides a lib from vendors
When a lib is explicitly marked as `vendor_available: false`, then it
can't be directly depended by a vendor lib which is installed to /vendor
partition. This is to hide some VNDK libs (including llndk) from vendors
so that platform owners can have a freedom of modifying their ABI
without breaking vendors.

In addition, the list of the private libs are exported to the make world
as VNDK_PRIVATE_LIBRARIES.

Also, fixed a bug that allowed a vndk lib to link against to vendor
library (or vendor variant of a system lib) if the lib is prebuilt.

Bug: 64730695
Bug: 64994918
Test: Add `vendor_available: false` to libft2 and libcompiler_rt.
Add the libs to shared_libs property of a vendor library in soong
(i.e. libnbaio_mono). The build fails with the error message.

Change-Id: Iab575db96bb4f6739a592f3fa0a75124296bea0c
2017-10-10 19:38:06 +09:00
Dan Willemsen
846c9f8b03 Get some more debugging for ckati crashes
am: 89479facb9

Change-Id: I9a642cd7e88a0b786e43ce61484d63e87d94d079
2017-10-10 01:36:39 +00:00
Dan Willemsen
89479facb9 Get some more debugging for ckati crashes
The crash we're following is likely a stack overflow. Use an alternate
stack to actually get the backtraces.

Also write out ulimit to reference what the stack size should be.

Bug: 36182021
Test: ulimit -s 768; build/soong/build_test.bash
Change-Id: I8826e5e53f38af552c8b80a1a8a490fde55f2d4b
2017-10-10 01:31:21 +00:00
Colin Cross
bff96b668d Merge changes I5400e4b0,Ia6760b01,I8a076c99
am: 2675f5648b

Change-Id: I4d98847de2c57df844778c63a63798fc7d2787d7
2017-10-10 01:18:54 +00:00
Treehugger Robot
2675f5648b Merge changes I5400e4b0,Ia6760b01,I8a076c99
* changes:
  Add test for java generated sources
  Fix doubled generated source files
  Fix mixing genrule dependencies with globs
2017-10-10 01:14:49 +00:00
Colin Cross
54190b3b13 Add test for java generated sources
Bug: 67364649
Test: TestGeneratedSources
Change-Id: I5400e4b013dc47c04b9d32787e50c5281033484d
2017-10-09 15:36:06 -07:00
Colin Cross
52b1e4cf06 Fix doubled generated source files
Generated source files were being included twice, once manually
and once by ctx.ExpandSources.  Remove the manual one.

Bug: 67364649
Test: TestGeneratedSources in later patch
Change-Id: Ia6760b01a34a96767a914bdcb911a39fa6683300
2017-10-09 15:35:57 -07:00
Colin Cross
05a39cbacc Fix mixing genrule dependencies with globs
Putting a genrule dependency after a glob in a srcs property
was causing the generated files to be treated as globbed files
and hitting an interface conversion panic.

Bug: 67364649
Test: TestGeneratedSources in later patch
Change-Id: I8a076c9998fdd07e53769922be433a793ca575a9
2017-10-09 15:35:47 -07:00
Jeff Gaston
002dfee475 Merge "have build_test.bash work when run as ./build_test.bash"
am: 4ddac411cb

Change-Id: If674f5bb378b0c2e47b010c23d8f0dc7917b4fdf
2017-10-09 18:43:52 +00:00
Jeff Gaston
4ddac411cb Merge "have build_test.bash work when run as ./build_test.bash" 2017-10-09 18:33:00 +00:00
Dan Willemsen
26b0f0fb95 Merge "multiproduct_kati: Support skipping known-broken products"
am: 29b41ed830

Change-Id: I0dc243a73e08201bfae39de33f77f42684d63aea
2017-10-07 00:47:23 +00:00
Treehugger Robot
29b41ed830 Merge "multiproduct_kati: Support skipping known-broken products" 2017-10-07 00:38:27 +00:00
Jeff Gaston
e2128d3468 have build_test.bash work when run as ./build_test.bash
Test: ./build_test.bash
Bug: 67478260

Change-Id: I027dcf7505def2253b9e41721aa6c226239f69c7
2017-10-06 15:52:36 -07:00
Dan Willemsen
9957b9ccdc multiproduct_kati: Support skipping known-broken products
This can make it easier to add build/soong/build_test.sh to continuous
build branches to catch new breaks, but where some products are known to
be broken.

Test: build/soong/build_test.bash --skip-products aosp_arm,aosp_arm64
Change-Id: Ib240570b68957077047ca75b78658429cb8c6a49
2017-10-06 15:05:05 -07:00
Jeff Gaston
eb11107858 Merge "Add usage message to androidmk"
am: 1658f994ec

Change-Id: I68a6aa216ff0232c06942fe4090ff58eec5c9c01
2017-10-06 21:41:10 +00:00
Treehugger Robot
1658f994ec Merge "Add usage message to androidmk" 2017-10-06 21:31:19 +00:00
Dan Willemsen
3f45a893aa Merge "Add target.linux for linux kernel based targets"
am: 9d93e33b1e

Change-Id: I7d923fbc93f41bbeb756307712fbba0813369da7
2017-10-06 19:59:26 +00:00
Dan Willemsen
9d93e33b1e Merge "Add target.linux for linux kernel based targets" 2017-10-06 19:43:34 +00:00
Jeff Gaston
4b9ef72fe2 Add usage message to androidmk
Test: androidmk 2>&1 | grep usage && androidmk --help 2>&1 | grep usage && echo ok
Bug: 67426255
Change-Id: I1e5033321c62c6744672f2ea435a422a4b9bd3da
2017-10-06 11:48:44 -07:00
Greg Hartman
7d9437a19e Merge "Use correct flags for host-side assembly"
am: c7ba6a2e46

Change-Id: Ice4a01b8d27daecc26cbb934be8e7139413ce7da
2017-10-06 11:52:05 +00:00
Treehugger Robot
c7ba6a2e46 Merge "Use correct flags for host-side assembly" 2017-10-06 11:48:24 +00:00
Colin Cross
cb7c503ddb Merge "Use prebuilts/jdk/jdk9 if EXPERIMENTAL_USE_OPENJDK9 is set"
am: ac1c64e2f3

Change-Id: I83f022089e0c95a931445273c10509ed0c1885a0
2017-10-06 04:41:32 +00:00
Treehugger Robot
ac1c64e2f3 Merge "Use prebuilts/jdk/jdk9 if EXPERIMENTAL_USE_OPENJDK9 is set" 2017-10-06 04:34:52 +00:00
Jeff Gaston
3a7822c571 Have bpfix not remove empty lists
Since in some cases they're not the default value.

Test: echo "cc_defaults{ system_shared_libs:[] }" | bpfix | grep system_shared_libs > /dev/null && echo ok
Bug: 66979076
Change-Id: I760b34f980281b955972819676bd62154a6c73f5
2017-10-05 18:17:53 -07:00
Colin Cross
5039437944 Merge "Correctly add dependencies to java_resource_dirs files"
am: a221b16e02

Change-Id: Ia61bfaadcf4a547d63f788dd708d7e0bbc8bb6ee
2017-10-06 01:05:48 +00:00
Colin Cross
b3a119b196 Merge "Honor resource exclusions in java_resources properties"
am: 9d7bee729a

Change-Id: I5947e8f1ab79144ec4594d30cc138e8c8354037c
2017-10-06 01:04:55 +00:00
Treehugger Robot
a221b16e02 Merge "Correctly add dependencies to java_resource_dirs files" 2017-10-06 00:56:19 +00:00
Treehugger Robot
9d7bee729a Merge "Honor resource exclusions in java_resources properties" 2017-10-06 00:54:19 +00:00
Colin Cross
e2ad230989 Use prebuilts/jdk/jdk9 if EXPERIMENTAL_USE_OPENJDK9 is set
Bug: 62123342
Test: m -j EXPRIMENTAL_USE_OPENJDK9=1.8 checkbuild
Change-Id: I2a5a0f0962bca050a087340f7c6a262448c54a94
2017-10-06 00:08:46 +00:00
Colin Cross
e497775645 Merge changes I5f6f3da7,Ia37b8b93,Ie79a2e78
am: c21d11850d

Change-Id: Ib98794f0fd32f093c139602ae432a767b4dfe849
2017-10-05 23:30:19 +00:00
Treehugger Robot
c21d11850d Merge changes I5f6f3da7,Ia37b8b93,Ie79a2e78
* changes:
  Get dex jar resources from classpath jar
  Add -stripFile argument to merge_zips
  Change default jar time to match ziptime
2017-10-05 23:20:17 +00:00
Colin Cross
24622d0101 Allow full protos in host modules
am: 647aa4f009

Change-Id: I0a6669a16dfd9ef1ae51daf61a407825162343ff
2017-10-05 23:09:29 +00:00
Colin Cross
647aa4f009 Allow full protos in host modules
Test: m -j checkbuild
Change-Id: I9dd076fea3e0544b8bdeeac9b040a8ee9d818715
2017-10-05 20:56:51 +00:00
Greg Hartman
09302bee38 Use correct flags for host-side assembly
BUG: 67434336
Test: Built libjpeg-turbo, confirmed flags
Change-Id: I54c1cc968d0a08d3a221ef4c46f2572269420c6a
2017-10-05 13:08:28 -07:00
Pirama Arumuga Nainar
c4b159068b Check if "instrumentation" and "sampling" are set together
am: 6fc8d9126c

Change-Id: I7fb75e4ab8a8983d59388611951fc8b4a59e39ec
2017-10-05 19:16:26 +00:00
Pirama Arumuga Nainar
b6ee902f0e Explicitly link the profile runtime during PGO
am: 49b53d5c7c

Change-Id: I57bdf23a4976014b8758fe8ebb3047072773e7fc
2017-10-05 17:34:24 +00:00
Pirama Arumuga Nainar
6fc8d9126c Check if "instrumentation" and "sampling" are set together
Setting these simultaneously is an error.

Test: Check error generation in a test module

Change-Id: I2ee127fa1b7157fa5f4489d2541ff023c64f9ba5
2017-10-05 10:33:57 -07:00
Pirama Arumuga Nainar
49b53d5c7c Explicitly link the profile runtime during PGO
Bug: http://b/65598278

The profile runtime depends on libgcc for some symbols (only under some
circumstances - armv5, ndk r14, static executables).  Since Android
build passes -nostdlib and adds libgcc manually, the profile runtime
gets passed to the linker later than libgcc.

Instead, explicitly add the profile runtime to the linker command (and
pass one other flag added by the clang driver to the link).

Test: Build a library with profile instrumentation that otherwise fails
instrumented build.

Change-Id: I24b34cebd2c3bb6a540f8f4c465ace1be4eb90f3
Signed-off-by: Pirama Arumuga Nainar <pirama@google.com>
2017-10-04 22:25:19 -07:00
Colin Cross
af9c55b780 Correctly add dependencies to java_resource_dirs files
java_resource_dirs was using a file list file that was generated
at ninja time to get the list of files to include, which meant
there were no dependencies on the files to cause res.jar to get
rebuilt.  Switch to using a glob at soong time instead.  This
is substantially similar to a glob in java_resources, except that
java_resource_dirs strips the listed directories off the paths
that end up in the jar.

Test: TestResources in java_test.go
Change-Id: I4b9b38f7b6b38a013cbb4e211187e7282a6795c0
2017-10-04 17:19:43 -07:00
Colin Cross
2372923fe0 Honor resource exclusions in java_resources properties
Honor the default resource exclusions in java_resources properties
including *.java.

Test: m -j checkbuild
Change-Id: Ia117a000680161b54c189758926ddb2068a2a2c3
2017-10-04 17:19:43 -07:00
Colin Cross
7db5d6332f Get dex jar resources from classpath jar
Dex jars were getting their resources from the res.jar files of
their transitive static dependencies.  This accidentally bypassed
jarjar on resources, since the jarjar pass only happened once the
resources jar was combined into the classpath jar.  Switch to
getting the resources out of the classpath jar by merging it
with the dex jar while skipping *.class.

Test: m -j checkbuild
Test: compare ext.jar to one generated by make
Change-Id: I5f6f3da738dcb0af56ab9a1bd7174ed5359de2b2
2017-10-04 17:19:43 -07:00
Colin Cross
0cf45cdc1e Add -stripFile argument to merge_zips
Putting resources in dex jars is going to need to pull files from
classpath jars that do not match *.class.

Test: m -j checkbuild
Change-Id: Ia37b8b9387e5f5636769afc6937b9aa3c9ec1ced
2017-10-04 17:19:43 -07:00
Colin Cross
bddcf13555 Change default jar time to match ziptime
Ziptime uses Jan 01 2008, use the same in soong_zip and merge_zips.

Test: manual
Change-Id: Ie79a2e7864a5ed5a74833caec0a50c25a451859e
2017-10-04 17:19:43 -07:00
Jeff Gaston
abb8dd0c30 Merge "Revert "Some clarifications in preparation to automatically order linker dependencies""
am: 60e38b613f

Change-Id: I46b7fc5794334baf97e53ad8b18b85828424e51d
2017-10-04 21:17:34 +00:00
Jeff Gaston
60e38b613f Merge "Revert "Some clarifications in preparation to automatically order linker dependencies"" 2017-10-04 21:09:29 +00:00
Jeff Gaston
7b6118be6b Revert "Some clarifications in preparation to automatically order linker dependencies"
This reverts commit 2370af0e23.

Reason for revert: New Build Breakage: aosp-master/aosp_arm64_ab-userdebug @ 4376965

Change-Id: Ibe4b819c4292457c454bf42e6d94fba3071ec04b
2017-10-04 21:07:42 +00:00
Jeff Gaston
96ec6d4089 Merge "Some clarifications in preparation to automatically order linker dependencies"
am: 2ade0243ae

Change-Id: Ic3bce4d33cc08829be80e478ba5580891c92977d
2017-10-04 18:14:38 +00:00