Commit graph

4769 commits

Author SHA1 Message Date
Jiyong Park
be4d89249a Squash vendor sources before linkageMutator runs
am: 6a43f04777

Change-Id: I8656bd768bf82b68821beb28678652bdcf2ebfe6
2017-10-15 02:45:51 +00:00
Dan Willemsen
8122bd58ba Revert "Always run asan ckati on the build servers"
This reverts commit a3e6c520ac. I fixed
a few heavy stack users, and we've got better debugging.

Bug: 36182021
Test: m dist
Change-Id: Iefd8589185720e44c40a2e0ceff5fd1438211b86
2017-10-14 00:43:13 +00:00
Dan Willemsen
75d2c170b4 Always record kati stats into soong log
Pass --dump-stats to ckati, but filter out the '*kati*' lines so that
they only end up in our verbose output. That way we've always got access
to the statistics.

Bug: 36182021
Test: m nothing; cat out/soong.log
Change-Id: Iaf7a814fc67f3e475c913faf69924a7f4e2ae3b3
2017-10-14 00:42:30 +00:00
Dan Willemsen
37cba1471f Merge "Switch product configs from make to ckati" 2017-10-13 23:22:00 +00:00
Jeff Gaston
daf774f1f0 Merge "Make some params in soong_zip explicit and/or exported" 2017-10-13 20:08:52 +00:00
Elliott Hughes
4d219e801d Merge "Unified sysroot: arch-X/include directories are gone." 2017-10-13 17:35:41 +00:00
Jiyong Park
6a43f04777 Squash vendor sources before linkageMutator runs
linkageMutator removes srcs property of the shared variant of a lib in
order to reuse *.o files compiled for the static variant also to the
shared variant.

However, this causes problem when vendor-specific srcs are specified in
target: {vendor: {srcs: ["..."]}}. For example, let's assume

cc_library {
    name: "libfoo",
    srcs: ["foo.c"],
    target: {
        vendor: {
            srcs: ["bar.c"],
        },
    },
}

Then,
static_vendor: inputs = foo.o, bar.o
shared_vendor: inputs = foo.o (from static_vendor), bar.o (from
static_vendor), bar.o

So, bar.o is included twice and this causes multiple symbol definition
error.

In order to handle the problem, vendor mutator is applied before the
linkage mutator and the vendor-specific srcs are squashed in the vendor
mutator.

Bug: 67731122
Test: build
Test: cc_test.go

Change-Id: I2a5390295dddfc41260e9b6f02746908cdf47228
2017-10-13 14:36:12 +09:00
Dan Willemsen
b2e6c2e571 Switch product configs from make to ckati
This speeds up dumping make variables from ~380ms using make to ~220ms
using ckati. It also means that we're consistently using the same parser
for builds (with the same .KATI_READONLY/etc extensions).

envsetup.sh (lunch) / other scripts still use make, changing those to go
through soong_ui will be a future change.

Test: m clean; m nothing
Test: USE_GOMA=true m nothing
Test: m PRODUCT-aosp_x86-sdk
Test: m APP-Calculator
Test: build/soong/build_test.bash -only-config  (on AOSP and internal master)
Change-Id: I6ca554de8de4955fb869001d06d29969b75751cc
2017-10-12 18:11:08 -07:00
Jeff Gaston
c3bdc975a4 Make some params in soong_zip explicit and/or exported
in preparation to split soong_zip into a lib and a bin

Bug: 67478260
Test: m -j
Change-Id: I725da6f0c9b13069e3e5b036e2ac8cbdde9ba6bf
2017-10-12 12:51:52 -07:00
Elliott Hughes
de28deb460 Unified sysroot: arch-X/include directories are gone.
Bug: N/A
Test: builds
Change-Id: I98fc6a1a3c0be1c90b1deb35b54f36ab16a202ac
2017-10-12 09:07:53 -07:00
Colin Cross
786a19151b Merge "Let tests override environment"
am: 432a2d4033

Change-Id: I3dc5ba434ad147f94e43c2ccf423d08e50d6de91
2017-10-11 08:23:50 +00:00
Treehugger Robot
432a2d4033 Merge "Let tests override environment" 2017-10-11 08:18:17 +00:00
Colin Cross
6ccbc913e4 Let tests override environment
Pass an environment to TestConfig that will be used for
all Config.Getenv calls.

Test: none
Change-Id: I683cd9c9e0db61c9bfd2adb27fca78f558f225c4
2017-10-10 23:28:43 -07:00
Jiyong Park
b08d2636ef Merge "vendor_available:false hides a lib from vendors"
am: 7228a62297

Change-Id: Ib4a7e75a5daf11eb70b00e0f0d6ebc8a40738c21
2017-10-11 01:50:57 +00:00
Treehugger Robot
7228a62297 Merge "vendor_available:false hides a lib from vendors" 2017-10-11 01:45:36 +00:00
Pirama Arumuga Nainar
c5a3ea48b5 Merge changes Ib23bad52,I1923ebde
am: 3656beab20

Change-Id: I61c15978779b2cd175b07e4a3a47d8212791c12c
2017-10-11 00:18:23 +00:00
Treehugger Robot
3656beab20 Merge changes Ib23bad52,I1923ebde
* changes:
  Do not use profiles if ANDROID_PGO_NO_PROFILE_USE is set
  Refactor methods to be on PgoProperties struct
2017-10-11 00:08:29 +00:00
Pirama Arumuga Nainar
0fdfc459cf Do not use profiles if ANDROID_PGO_NO_PROFILE_USE is set
Bug: http://b/65598278

Non-PGO builds (with this environment variable set) can be used to
measure the performance difference induced by PGO.

Test: Build PGO modules with ANDROID_PGO_PROFILE_USE set.
Change-Id: Ib23bad5208ac7f54894c7768d7532f53b6b91179
2017-10-10 15:41:25 -07:00
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