Commit graph

15139 commits

Author SHA1 Message Date
Colin Cross
e8ba308dcf Merge "Shard gensrcs modules into multiple commands" 2019-10-07 22:03:54 +00:00
Colin Cross
2334757d24 Merge "Filter product variable property structs" 2019-10-07 20:53:44 +00:00
Treehugger Robot
c6136c9d65 Merge "Remove old-style support for translated second architectures" 2019-10-07 20:48:07 +00:00
Treehugger Robot
bd7c98ce22 Merge "Fix dumpvars $PATH / $TMPDIR" 2019-10-07 19:29:17 +00:00
Colin Cross
8b0dc4be07 Merge "Add symlinks to sh_binary in soong" 2019-10-07 17:47:45 +00:00
Colin Cross
63c7727dec Merge changes from topics "soong_java_aidl", "soong_java_proto"
* changes:
  Shard aidl compiles into srcjars
  Shard java proto files into groups of 100
  Support deps files with no output
2019-10-07 17:33:00 +00:00
Chih-hung Hsieh
3776d9546a Merge "Fix defaults of BaseCompilerProperties" 2019-10-07 04:46:30 +00:00
Treehugger Robot
36aecc1f6d Merge "Rename vndk apex according to vndk version" 2019-10-07 04:44:45 +00:00
Rashed Abdel-Tawab
6a34131da4
Add symlinks to sh_binary in soong
This allows us to change `logpersist.start` to `sh_binary` and unblocks
breakpad symbol uploading

Test: convert logpersist.start to sh_binary and verify symlinks are correct
Change-Id: I1b86c512df73a336205ca35216445a08e43bb879
2019-10-04 20:51:44 -07:00
Colin Cross
c080617c8b Shard aidl compiles into srcjars
Group aidl files into groups of 50 and compile them together into a
srcjar.

Bug: 124333557
Test: m checkbuild
Change-Id: I18e0858eab434071d3ff0039bb21e07c7311b601
2019-10-04 14:00:36 -07:00
Colin Cross
9516a6c3f2 Shard java proto files into groups of 100
Group protoc calls to generate java files into groups of 100
to avoid having a srcjar for every proto file.

Test: m checkbuild
Change-Id: I72a5efaabad24c975282df321d00ec2d7900645e
2019-10-04 14:00:36 -07:00
Colin Cross
5274d581eb Support deps files with no output
AIDL generates a deps file with no output listed temporarily pass it
through without error in the makedeps parser.

Bug: 141372861
Test: m checkbuild
Change-Id: I8c6740833dbc2ff3318dfc424ec497728cfc48d2
2019-10-04 14:00:36 -07:00
Dan Willemsen
4e2456bc09 Fix dumpvars $PATH / $TMPDIR
Instead of just using the host $PATH during dumpvars, use our path
configuration from the regular build. But instead of creating a ton of
symlinks to the interposer, just use a small directory of symlinks. This
only takes ~3ms (vs ~300ms), at the expense of error logging. Since we
do just about the same product configuration at the start of the build,
we can just rely on the logging there.

This fixes warnings printed by the Mac build, since we using the host
`date` instead of the toybox version:

usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

TMPDIR was being shared with the main build, but we're allowed to run in
parallel. If a build is started while we're running, our TMPDIR may be
cleared. Instead, create our own temporary directory, which doesn't need
to be a stable value (as we never do caching here).

Fixes: 141893400
Test: (on mac) source build/envsetup.sh; lunch
Change-Id: I0ff536e71dc5649cae26daa0087eb80861704021
2019-10-04 12:53:51 -07:00
Treehugger Robot
96ce6ab143 Merge "Use localPool consistently for UseGoma() == true" 2019-10-04 18:36:07 +00:00
Anton Hansson
332f35fc92 Merge "Add partition subdirs to system_other" 2019-10-04 06:30:55 +00:00
Colin Cross
92e03dfb3e Merge "Use -nostdlib++ instead of -nodefaultlibs" 2019-10-04 03:26:11 +00:00
Colin Cross
f7a17daefe Use -nostdlib++ instead of -nodefaultlibs
Host builds using libc++ used -nodefaultlibs to turn off the default
C++ runtime, and then added back all the other necessary libraries.
Clang supports -nostdlib++ since https://reviews.llvm.org/D47115
that removes the C++ runtime without affecting the other default
libraries.  Use -nostdlib++, and remove the lists of default
libraries.

Test: m checkbuild
Change-Id: I722bd6596a1f3f5819f2767c29c0fa1e8b3ec0e8
2019-10-03 16:09:01 -07:00
Colin Cross
4acb77e76a Merge changes from topic "install"
* changes:
  Replace RelPathString() with ToMakePath()
  Separate InstallPath from OutputPath
  Add InstallInRoot to allow modules to install into root partition
2019-10-03 21:50:57 +00:00
Colin Cross
ff6c33d885 Replace RelPathString() with ToMakePath()
Add a ToMakePath() method that returns a new path that points out
out/ instead of out/soong/, and replace the
"$(OUT_DIR)/" + path.RelPathString()
pattern with
path.ToMakePath().String()

Bug: 141877526
Test: m checkbuild
Change-Id: I391b9f2ed78c83a58d905d48355ce9b01d610d16
2019-10-03 10:07:53 -07:00
Colin Cross
70dda7e3da Separate InstallPath from OutputPath
Create a new type InstallPath that is similar to OutputPath to
differentiate intermediates output paths from installed output
paths.

RelPathString is a poorly defined, undocumented function that is
primarily used to get an install path relative to out/soong to
generate an equivalent install path for Make relative to $(OUT_DIR).
Move it to InstallPath for now, and fix the one remaining user on
OutputPath.

Add a method to create an NDK install path so that ndk_sysroot.go
doesn't have to do it manually with PathForOutput.

Bug: 141877526
Test: m checkbuild
Change-Id: I83c5a0bd1fd6c3dba8d3b6d20d039f64f353ddd5
2019-10-03 10:07:53 -07:00
Colin Cross
90ba5f4e98 Add InstallInRoot to allow modules to install into root partition
If InstallInRoot() returns true the module will be installed to
$OUT/root or $OUT/recovery/root.

Bug: 141877526
Test: m checkbuild
Test: no change to build.ninja or Android-${TARGET_PRODUCT}.mk
Test: TestPathForModuleInstall
Change-Id: Id6e435c6019f11eeb5806528fd464dbf220b88d9
2019-10-03 10:07:46 -07:00
Alexander Smundak
5ffade1efb Merge "Fix corpus name." 2019-10-03 16:54:55 +00:00
Chih-Hung Hsieh
961a30c714 Fix defaults of BaseCompilerProperties
* Edition and Deny_warnings should not be set when
  constructing a BaseCompilerProperties, or the
  initialized values will reject values inherited from rust_defaults.
* Use getEdition and getDenyWarnings to retrieve those properties
  with defaults from config.

Bug: 141699953
Test: mm in rust projects
Change-Id: Id1ae357caeaf656cd33732bf4e54920e206f4ead
2019-10-03 09:47:06 -07:00
Logan Chien
65ab468452 Merge "Add BUILD_BROKEN_PREBUILT_ELF_FILES to dumpvars.go" 2019-10-03 15:51:09 +00:00
Anton Hansson
43ab0bc24a Add partition subdirs to system_other
...and move odex/vdex files into the dir corresponding to their
source app's partition.

Bug: 141707536
Test: soong unit test
Test: lunch aosp_blueline && m
Change-Id: I90a7a6c97e0eb2706951a2317a1a65a59ca974fa
2019-10-03 14:21:30 +01:00
Anton Hansson
a9e13f785f Merge "Beef up system_other odex tests" 2019-10-03 11:01:03 +00:00
Sasha Smundak
c7e6caad59 Fix corpus name.
Bug: 141385476
Test: manual
Change-Id: I609451b1fe58c076a6d9d7f5775884b52f7cd440
2019-10-02 14:47:23 -07:00
Treehugger Robot
62be1e3e33 Merge "Hide static from cc_library_shared and vice versa" 2019-10-02 21:39:37 +00:00
Treehugger Robot
2f429160c1 Merge changes from topic "filter_arch_properties"
* changes:
  Make CreateModule return the newly created module
  Move arch properties to proptools.FilterPropertyStruct
2019-10-02 18:53:54 +00:00
Anton Hansson
4ec91dd47d Beef up system_other odex tests
Add some more test combinations, in particular apps in
/product and /system/product, as well as some different
patterns.

Bug: 141707536
Test: soong unit test
Change-Id: I9ea431770132d95a4411c7903402993806e1f8c8
2019-10-02 18:22:29 +01:00
Treehugger Robot
b244e84de6 Merge "Use SHA-256 for hashing BoringSSL crypto module." 2019-10-02 15:59:36 +00:00
Jiyong Park
321d7114c3 Merge "Add apex_available to control the availablity of a module to APEXes" 2019-10-02 07:53:59 +00:00
Yi Kong
444c809bbc Merge "Remove -Wno-c++98-compat-extra-semi warning flag" 2019-10-02 05:16:46 +00:00
Jiyong Park
127b40b316 Add apex_available to control the availablity of a module to APEXes
apex_available property controls the availability of a module to APEXes.
For example, `apex_available: ["myapex", "otherapex"]` makes the module
available only to the two APEXes: myapex and otherapex, and nothing
else, even to the platform.

If the module is intended to be available to any APEX, then a pseudo
name "//apex_available:anyapex" can be used.

If the module is intended to be available to the platform, then another
pseudo name "//apex_available:platform" is used.

For now, if unspecified, this property defaults to ["//apex_available:platform",
"//apex_available:anyapex"], which means the module is available to everybody.
This will be reduced to ["//apex_available:platform"], when marking for
apex_available for existing modules are finished.

Bug: 139870423
Bug: 128708192
Test: m
Change-Id: Id4b233c3056c7858f984cbf9427cfac4118b2682
2019-10-02 14:12:16 +09:00
Yo Chiang
fdc9afa15b Merge "Change RRO enforcement logic" 2019-10-02 02:34:35 +00:00
Jooyung Han
90eee02a9a Rename vndk apex according to vndk version
VNDK APEX should be named after the version of VNDK libs.
For example, if vndk_version is 29, then the apex name should be
com.android.vndk.v29. If vndk_version is not set or is 'current', then
the platform vndk version is implied.

This is done with setting "apex_name" with proper name.

Bug: 139774701
Test: m (soong test added)
Change-Id: I918252f12ccd351886030fe9139a020d6cf1ff32
2019-10-02 10:02:30 +09:00
Yi Kong
d0ce0fbfde Remove -Wno-c++98-compat-extra-semi warning flag
hidl/aidl actually does concern about this warning. After fixing their
codebase, this flag is no longer needed.

Test: presubmit
Change-Id: Id88abea88137be0f873c21db76644fe78b9045c8
2019-10-01 22:42:59 +00:00
Colin Cross
2e2dbc250a Use localPool consistently for UseGoma() == true
Remove the distinction between pctx.StaticRule and
pctx.AndroidStaticRule so that all of the local rules correctly
get assigned to the localPool.  Also put Module and Singleton
rules into the localPool.

Test: compare out/soong/build.ninja
Change-Id: Id2bb38eff3c7209340fe55bc9006f00bd3661d81
2019-10-01 14:11:20 -07:00
Treehugger Robot
bb03d69ece Merge "Pass --remap-path-prefix to Rust builds." 2019-10-01 21:08:07 +00:00
Chih-hung Hsieh
2cca3a0668 Merge "Emit linked file and dep-info in one call to rustc" 2019-10-01 20:44:57 +00:00
Treehugger Robot
f856c005cb Merge changes from topic "soong_c_flags"
* changes:
  Creation of C Flags Build Variables
  Move sharding functions for reuse
2019-10-01 19:25:50 +00:00
Joel Galenson
724286c957 Pass --remap-path-prefix to Rust builds.
We need to pass --remap-path-prefix to Rust builds to ensure that they
are reproducible across different paths.  This adds that for both host
and device builds.

Test: Verify host and device builds are reproducible with different
directories.

Change-Id: I68ba31537b2332fd05613aa0fb00a1502d78e410
2019-10-01 11:12:15 -07:00
Jaewoong Jung
9dc1756484 Merge changes I3d6506f5,I3667eac9
* changes:
  Fix split apk paths.
  Fix android_test install path.
2019-10-01 16:54:40 +00:00
Pete Bentley
5c4be82ce0 Use SHA-256 for hashing BoringSSL crypto module.
Reason: Performs significantley better than SHA-512
on ARM64 devices

Bug: 141710485
Test: flashall
Change-Id: I40f0873d3e705a75b9a7a3ba1445a9176afff77b
2019-10-01 17:03:17 +01:00
Yo Chiang
4ebd06aa57 Change RRO enforcement logic
Change RRO logic from
"Enforce RRO for all modules when PRODUCT_ENFORCE_RRO_TARGETS is '*'"
to
"Enforce RRO for all modules when PRODUCT_ENFORCE_RRO_TARGETS includes '*'"

Bug: b/137727426
Test: test build on local machine
Change-Id: I5df1a776d324c92c0c8bbf79b4f24536cb9b5c21
2019-10-01 15:08:56 +08:00
Treehugger Robot
fd3688c449 Merge "apex: libbinder whitelist -= com.android.media" 2019-10-01 00:56:39 +00:00
Chih-Hung Hsieh
885f1c697d Emit linked file and dep-info in one call to rustc
Bug: 141858619
Test: mm in projects with Rust modules
Change-Id: I05a2e06caa177f95bc2ad3691a5f48294051a212
2019-09-30 14:12:35 -07:00
Treehugger Robot
ec3b133b8b Merge "Move fuzz phony to be make-defined, and add to dist." 2019-09-30 20:24:19 +00:00
Mitch Phillips
a0a5e19140 Move fuzz phony to be make-defined, and add to dist.
Add the fuzz packages to dist. This requires that the phony for 'make'
be define in make itself, rather than in Soong. See comments on other
patch in topic for more information.

Bug: 141026328
Test: m fuzz dist

Change-Id: I4cd476adcfa42e4b40911c4a32427a7b00c67cc3
2019-09-30 10:36:11 -07:00
Jesse Pai
4d33666639 Creation of C Flags Build Variables
Modifications made to soong/cc to look for specific C Flags used by
Android modules and store name of module into a build variable array.

Bug: 140442588
Test: Executed m dist and presubmit
Change-Id: If46a11462369c43bbcd445156aff0641514c58b1
2019-09-30 16:24:16 +00:00