Commit Graph

15166 Commits

Author SHA1 Message Date
Treehugger Robot baf127ce2a Merge "Add system_modules to droidstubs" 2019-10-14 13:30:38 +00:00
Anton Hansson 300a084db6 Merge "Move odexes of non-system apps into system_other" 2019-10-14 09:29:10 +00:00
Treehugger Robot 8785e55e1c Merge "Correctly install APK-in-APEX" 2019-10-14 00:22:33 +00:00
Treehugger Robot 692a8fd4b6 Merge "Add go directive to indicate go version number." 2019-10-11 19:08:47 +00:00
Jaewoong Jung 5188e23903 Add go directive to indicate go version number.
Test: go vet ./...
Change-Id: I815bec9cba04f6c171f0ef5a3a909c4f5f28f6c2
2019-10-11 09:51:43 -07:00
Jiyong Park f383f7cfc6 Correctly install APK-in-APEX
APK in a flattened APEX is installed as 'ETC' class module, instead of
the 'APP' class. This is to prevent Make from doing app-specific
amendments (e.g. such as adding module name after my_module_path)
to the paths and filenames which are all correctly set in the Soong
side.

Test: add `installable:true` to development/samples/Snake/Android.mk
and add 'Snake' to the `apps` property of an APEX. The build is
successful.
Test:  build the APEX on a device with TARGET_FLATTEN_APEX=true
The APK is at system/apex/<apexname>/app/Snake/Snake.apk

Bug: 142537672

Change-Id: I314bf1ab7abd4d4a4e9fa210442c004f54d8ccca
2019-10-12 01:06:39 +09:00
Paul Duffin e25c644f1e Add system_modules to droidstubs
This allows droidstubs to use the same system modules to create the
stubs that will be used to compile them. It improves consistency and
avoids droidstubs having to duplicate the libraries that make up the
system modules on its libs property.

Adds systemModules() to the sdkContext which allows consistent error
checking behavior between droidstubs and java_library.

Bug: 142534789
Test: m checkbuild
Change-Id: Ib2006906d9528a900f16851f50b62152ffb51a1b
2019-10-11 16:38:14 +01:00
Adrian Roos 22762b98f3 Merge "droidstubs: Add API lint via metalava" 2019-10-11 09:31:59 +00:00
Elliott Hughes e04b73f100 Merge "Go back to the native mac xargs for now." 2019-10-10 21:18:59 +00:00
Lev Proleev eccca6c246 Merge "Revert "Add android.hardware.neuralnetworks@1.3"" 2019-10-10 14:06:42 +00:00
Lev Proleev d84ed52753 Revert "Add android.hardware.neuralnetworks@1.3"
This reverts commit 3cf57d72ce.

Reason for revert: the topic breaks git_qt-dev-plus-aosp

Change-Id: I4ee625982dac1b12755e9ebc6e0cdb2bfbd25613
2019-10-10 13:54:14 +00:00
Adrian Roos 075eedc38d droidstubs: Add API lint via metalava
Bug: 142459906
Test: make checkapi
Change-Id: I12fe864ef568ff6f5565106f7f24349f129decd7
2019-10-10 12:09:40 +00:00
Lev Proleev ac9b18609f Merge "Add android.hardware.neuralnetworks@1.3" 2019-10-10 10:25:21 +00:00
Treehugger Robot 9c32e3101e Merge "Fix flattened apex install dir" 2019-10-10 08:41:53 +00:00
Jooyung Han 7a78a92f79 Fix flattened apex install dir
This fixes the bug: flattened apex is installed under
/system/apex/<soong module name> not /system/apex/<apex name>.

Flattened apexes can be seen as pre-activated under /system/apex, which
is bind-mount to /apex. Therefore, install dir for flattend apex should
be the same with the activation point(or mountpoint) of non-flattened apex.

When apex_name: is set, it should be used as its name instead of name:.

This change also emits makevar APEX_FILE_CONTEXTS_INFOS which is list of
pairs(<apex_name>:<file_contexts>) and is used by sepolicy to modify
file_contexts files for flattened apexes properly.

Bug: 123314817
Bug: 142300241
Test: add a test apex module(foo) with apex_name(foobar)
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m foo
Test: see if the apex is installed correctly(/system/apex/foobar)
Test: see if the file_contexts for foo is correctly modified
Change-Id: I97a07de5cc772cd1d91e95ae059d282038028916
2019-10-10 12:54:56 +09:00
Elliott Hughes 27cc0a8f32 Go back to the native mac xargs for now.
Should unbreak the mac build while I work on toybox xargs some more.

Test: suck it and see (since there's no mac presubmit)
Change-Id: I48954f801fc980a1174f93e474d73a24ad12ce66
2019-10-09 18:12:33 -07:00
Treehugger Robot 9026090263 Merge "Add $PRODUCT_OUT/test_harness_ramdisk to installclean" 2019-10-09 23:49:46 +00:00
Pete Gillin 1f52e93db2 Add experimental option to use OpenJDK 11 toolchain.
With this change, setting the environment variable
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true switches from the OpenJDK 9
toolchain to the OpenJDK 11 one (prebuilts/jdk/jdk11).

Since the version of the java.base module has to match the version of
the jlink tool which consumes it, the --module-version argument to the
jmod create call is also switched.

Test: make
Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN make
Bug: 131683177
Change-Id: I606d22538165f309fe5537bd67a26390b1dd5771
2019-10-09 18:38:14 +01:00
Pete Gillin df7dc82a04 Remove the moduleName parameter to jarsToSystemModules.
This rule takes a moduleName parameter which only ever has the value
java.base. What's more, the assuption that the value will always be
java.base is baked into the rule in other ways (most significantly,
the module created with this name is passed to jlink, and jlink
requires a java.base module).

This change removes the parameter and hard-codes java.base everywhere,
on the basis that it's better to have it completely hard-coded than
partially configurable and partially hard-coded.

Test: make
Change-Id: Ib42cda92f623c5a1f929b5a99248ca8919e4700c
2019-10-09 17:09:38 +01:00
Bowgo Tsai 5145c2c11f Add $PRODUCT_OUT/test_harness_ramdisk to installclean
Also removes $PRODUCT_OUT/debug_ramdisk.

Bug: 140036184
Test: `make installclean` removes those directories
Change-Id: I442753817bdda4293b98ac1a7fd0173820dc2a2f
2019-10-09 01:59:51 +00:00
Slava Shklyaev 3cf57d72ce Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: Iee24fd8e70805eab3e352186e543fe02246a6a72
Merged-In: Iee24fd8e70805eab3e352186e543fe02246a6a72
(cherry picked from commit f4b5a5ba08)
2019-10-08 16:58:43 +01:00
Jiyong Park 583a226c0e Don't check apex_available for host
The check doesn't make sense for host.

Test: ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=out/dist
./art/tools/dist_linux_bionic.sh -j110 com.android.art.host
is successful

Change-Id: Icdb4bb557a83b3c8044e6c73721dab47c56888a1
2019-10-08 20:55:38 +09:00
Orion Hodson 4b5438a9ea Make apex_available respect AllowMissingDependencies
When SOONG_ALLOW_MISSING_DEPENDENCIES is defined in the build, don't
fail if an apex_available entry is not available. This is for smaller
Android manifests that may not include all APEX projects (e.g. master-art).

Bug: 142300164
Test: able to build from master-art manifest.
Change-Id: Ice1274f7dd143c4b1bf756e2cde93e217266affa
2019-10-08 10:40:51 +01:00
Treehugger Robot e89b8fb919 Merge "Remove no_apex in favor or apex_available" 2019-10-08 05:33:29 +00:00
Dan Willemsen b6699a1414 Restore previous behavior of `get_build_var TMPDIR`
My previous change makes TMPDIR a temporary directory that's removed
before we exit. So instead of starting ckati to get this value to a
directory that no longer exists, return the semi-stable value that we
use during a normal build.

Fixes: 142277335
Test: get_build_var TMPDIR
Change-Id: I37d1219b1fda09f131dee17ef7b91e475d3e39ad
2019-10-07 15:29:23 -07:00
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 12b8d427c7 Move odexes of non-system apps into system_other
Previously, the patterns in SYSTEM_OTHER_ODEX_FILTER only matched
subpaths of /system. Broaden this to match /<p> as well as /system/<p>.

Because SYSTEM_OTHER_ODEX_FILTER includes system_ext and product apps,
the immediate effect of this is that the odex and vdex files of
apps on those partitions move to system_other for A/B devices.

This makes the product and system_ext partitions smaller, which
in turn makes OTAs smaller.

Bug: 141707536
Test: soong unit tests
Test: (adb shell dumpsys package com.android.stk &&
       adb shell dumpsys package com.android.quicksearchbox) | grep -i dexopt -A3;
      verify dexpreopt state is 'prebuilt' for both
Test: adb shell find /data/dalvik-cache -name '*QuickSearch*.vdex' | wc -l == 1
Test: adb shell find /data/dalvik-cache -name '*Stk*.vdex' | wc -l == 1

Change-Id: I6e1e6d89c5822d48b522e7e6d77a363ed9f0e05b
2019-10-03 14:52:37 +01:00