Commit graph

9260 commits

Author SHA1 Message Date
Elliott Hughes
97295bd391 Switch to toybox chmod(1).
Test: treehugger
Change-Id: Iccb70941906d9cf8b004303a6935b7df1217babf
2018-12-17 14:55:10 -08:00
Treehugger Robot
ace2be498e Merge "Add installable property to apex module type" 2018-12-15 17:59:41 +00:00
Jiyong Park
6437995170 Remove -include <file> when compiling stubs.
Otherwise, the force included headers might cause conflicting types
error with the symbols in the generated stubs source code. e.g.

double acos(double); // in header
void acos() {} // in the generated source code

Bug: 120266448
Test: m (apex_test also updated, and passing)
Change-Id: I717df990959d1b24ec515f0f52a4e28b94e92f32
2018-12-15 23:03:47 +09:00
Jiyong Park
92c0f9ce54 Add installable property to apex module type
When set to false, the apex is built but not installed. Useful for not
polluting the system image with test APEXes when doing mma.

Bug: 120960303
Test: add 'installable: false' to apex.test under system/apex/tests/Android.bp
m; check that out/..../system/apex/apex.test.apex does not exist.

Change-Id: I383d5cdcc8aec705b6a5778dbd07233471d289d0
2018-12-15 22:58:14 +09:00
Treehugger Robot
1ee00b54d9 Merge changes I350fe490,I31e61862,I09b78e38
* changes:
  Stubs libs are available for host
  Don't create unnecessary APEX variations
  Stubs dependency is not installed
2018-12-15 13:47:59 +00:00
Treehugger Robot
df76efe524 Merge "Move -Wno-null-pointer-arithmetic to external only" 2018-12-15 00:29:19 +00:00
Dan Willemsen
82798583d1 Merge "Add support for exclude_srcs in genrule" 2018-12-14 23:42:34 +00:00
Colin Cross
4ff85ebeb7 Revert "Dexpreopt soong modules inside soong"
This reverts commit 29ff88741e.

Test: none
Bug: 119412419
2018-12-14 11:49:58 -08:00
Colin Cross
359e6436be Revert "Fix MaybeRel when OUT is absolute"
This reverts commit fee2bff77c.

Test: none
Bug: 119412419
2018-12-14 11:49:58 -08:00
Yi Kong
c9f6db50d3 Move -Wno-null-pointer-arithmetic to external only
Test: m checkbuild
Bug: 72331524
Change-Id: I9c49a8cef547f6c840001fd203a0abecaeef44d5
Merged-In: I9c49a8cef547f6c840001fd203a0abecaeef44d5
(cherry picked from commit 3e88cb0399)
2018-12-13 18:36:19 -08:00
Colin Cross
fee2bff77c Fix MaybeRel when OUT is absolute
MaybeRel was failing with an error when comparing an absolute out
path to a relative source path.  Make it return false instead, and
add tests.

Bug: 119412419
Test: paths_test.go
Change-Id: I462182638bd57b1367b5bfb0718e975c11ae66f7
2018-12-13 21:05:18 +00:00
Ivan Lozano
e98d11f733 Merge "Add option to avoid recovering with diagnostics." 2018-12-13 20:56:18 +00:00
Colin Cross
29ff88741e Dexpreopt soong modules inside soong
Port the dexpreopt logic from Make to the dexpreopt package in Soong,
and use it to dexpreopt Soong modules.  The same package is also
compiled into the dexpreopt_gen binary to generate dexpreopt scripts
for Make modules.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb
2018-12-13 15:53:54 +00:00
Jiyong Park
0fefdeac91 Stubs libs are available for host
The runtime APEX is built for host as well as for target. Therefore
stubs libs should be available also for host.

Bug: 120670568
Test: follow the repro step shown in b/120670568#comment4
Change-Id: I350fe490848ae9ceb55aade0521bdfaf48ed083f
2018-12-13 12:01:31 +09:00
Jiyong Park
0ddfcd1188 Don't create unnecessary APEX variations
This change fixes a problem that APEX variations are created for the
modules that actually shouldn't built for any APEX. For example,
consider this case.

apex { name: "myapex", native_shared_libs: ["mylib"],}

cc_library { name: "mylib", shared_libs: ["libfoo#10"],}
cc_library { name: "libfoo",
             shared_libs: ["libbar"],
             stubs: { versions: ["10"], }, }
cc_library { name: "libbar", ...}

Before this change, both the stubs and non-stubs variations of libfoo
were mutated with apexMuator, which is incorrect for the non-stubs
varia; there is no dependency chain from the apex "myapex" to the
non-stubs variation, but to the stubs variation due to the #10 syntax.

This was happening becauses we used the name of the module to determine
whether it should be built for APEX or not. Both stubs and non-stubs
variations have the same module name "libfoo".

Fixing this issue by recording the list of APEX variations required
directly on the module. So, the stubs variation of libfoo has myapex in
its apex variations list, but the non-stubs variation doesn't, and thus
apexMutator does not pick up the non-stubs variation.

Test: m (apex_test updated and passing)
Test: cherry-pick ag/5747464 and m
Change-Id: I31e618626809a828a55fff513ef5f81f79637afa
2018-12-13 10:48:15 +09:00
Jiyong Park
de866cbe50 Stubs dependency is not installed
When the stubs variant of a library is dependend by a platform component
and the library is included in one or more APEX, the library is not
installed to the platform, because it is provided by APEX.

Bug: 120266448
Test: m
Test: add stubs: { versions: ["1"], }, to libnetd_resolv
then build netd. libnetd_resolv.so does not exist under /system.

Change-Id: I09b78e38df285033ef6e9c85f7ea4b0274e85070
2018-12-13 10:48:15 +09:00
Treehugger Robot
9d824cc850 Merge "Remove dependency on framework.jar" 2018-12-13 01:46:54 +00:00
Dongwon Kang
f576fcd413 Merge "Don't install stubs" 2018-12-12 18:15:35 +00:00
Ivan Lozano
7929bba218 Add option to avoid recovering with diagnostics.
Add a no_recover option that allows specifying which sanitizers in
diagnostics modes shouldn't recover. This can help debugging as we test
enabling sanitizers in new libraries since it'll cause tombstones to be
generated along with the diagnostics information.

Bug: 80195448
Bug: 110791537
Test: Compiled test module with this flag, checked compiler command.
Test: Test module crashed, tombstone contained diagnostics information.
Change-Id: Ie938923ef95716c2d49d6cd719ee223ad62755c6
2018-12-12 10:01:16 -08:00
Jerome Gaillard
ff42f04af8 Merge "Upgrade Windows default build version from Vista to 7" 2018-12-12 13:59:56 +00:00
Treehugger Robot
08e047fdc6 Merge "Output of an apex module type can be included in tests" 2018-12-12 12:22:40 +00:00
Jiyong Park
74e240be03 Output of an apex module type can be included in tests
By implementing SourceFileProducer interface, output of an apex module
can be included in tests (via ':modulename' syntax in 'data' property)

Bug: 120055902
Test: replace apexd_testdata/* with :apex.test in
system/apex/apexd/Android.bp. m apex_file_test.
out/host/linux-x86/nativetest/apex_file_test/ has apex.test.apex in it.

Change-Id: I8b721a68e0edc65a3e674febeed485e06b96bc24
2018-12-12 18:33:30 +09:00
Yi Kong
e2025abe96 Merge "Remove unneeded -Wno-expansion-to-defined flag" 2018-12-12 02:27:48 +00:00
Jiyong Park
127d56580d Don't install stubs
Stubs libs are build-time only artifact. Can't be installed.

Test: OUT_DIR=out build/soong/scripts/build-ndk-prebuilts.sh
with https://android-review.googlesource.com/c/platform/frameworks/av/+/846770/7
and two more CLs in the same chain
Examine out/soong/build.ninja
Build rule for out/soong/target/product/generic_arm64/system/lib64/arm64/libmediandk.so
exist only once.

Change-Id: I58ff09ef3fbbdbd2d968aa21b87a493192d4216d
2018-12-12 10:41:55 +09:00
Treehugger Robot
055295d18a Merge "Move cut(1) to toybox." 2018-12-11 22:33:32 +00:00
Chih-hung Hsieh
d340852732 Merge "Disable cert-dcl16-c clang-tidy check for mingw32." 2018-12-11 17:41:38 +00:00
Elliott Hughes
9add81ed0f Move cut(1) to toybox.
Test: treehugger
Change-Id: I07dd7a45ee56178a72deaffc6c4796c3ec53f564
2018-12-11 09:39:48 -08:00
Jiyong Park
090d9df206 Disable cfi and stl for stubs libraries
Stubs libs are not built with dependencies required for cfi and stl.
Also it does not make much sense to build stubs with cfi and stl because
the libs are not for runtime and there is no C++ symbols.

Test: cherry-pick ag/5747464 and m
Change-Id: I83d6d82513a77a6a8a345e7d12707940c2c906c7
2018-12-11 19:43:56 +09:00
Chih-Hung Hsieh
327b6f0c69 Disable cert-dcl16-c clang-tidy check for mingw32.
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-*
Change-Id: Ibe46409543eaa4a7f3b710d9742b3252dc9ac7e8
2018-12-10 16:28:56 -08:00
Yi Kong
4603b9f411 Remove unneeded -Wno-expansion-to-defined flag
Test: m checkbuild
Bug: 29823425
Change-Id: I8c9c7cc92757af20d3a3bbcebeb6360d1df91530
2018-12-10 04:55:51 -08:00
Jiyong Park
28d395a149 Fix: build error when a lib with stubs is included in an APEX
apex { name: "foo", native_shared_libs: ["mylib"] }
cc_library { name: "mylib", shared_libs: ["other_lib"],
             stubs: { versions: ["1"]}, }

This is causing build error due to missing variant for other_lib.
This is happening because the stubs variant of mylib is added to apex
foo instead of the non-stubs variant. Because stubs variant does not
have any further dependencies, other_lib is not included to the APEX and
is not built for it.

Fixing this issue by specifying the version variant when adding a lib to
the dependency of an APEX, so that non-stub variant of the lib is
depended on.

Test: m (apex_test updated)
Change-Id: I972b6dcbce11942f83a76212715ba915534ec3df
2018-12-10 13:33:41 +09:00
Yi Kong
02c0ad48ba Remove unneeded -Wno-deprecated-register flag
Test: m checkbuild
Change-Id: I030a66b8a484673caf3a96a844dc26954e08071a
2018-12-09 04:41:38 +00:00
Treehugger Robot
adeb54c811 Merge "Disable hwasan frame descriptions." 2018-12-09 01:42:00 +00:00
Elliott Hughes
734a780217 Move touch(1) to toybox.
Test: treehugger
Change-Id: If31fe1fdc0150d07d5421702cbac8e142f522802
2018-12-07 18:30:52 -08:00
Treehugger Robot
3adf8b05f5 Merge "Add flag to disable source directory includes." 2018-12-08 00:33:35 +00:00
Evgenii Stepanov
0a87b664c3 Disable hwasan frame descriptions.
Current implementation does not play nice with -gc-sections.

Bug: 120673911
Test: make SANITIZE_TARGET=hwaddress recovery-persist
Change-Id: I36cd37fb41c0c26c7e747e2c1dd5fadf7a31f4e7
2018-12-07 15:33:24 -08:00
Yi Kong
4a7400be79 Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag""
This reverts commit f993e7797d.

Build breakage fixed.

Test: m checkbuild
2018-12-07 22:00:57 +00:00
Yi Kong
3412046caf Merge "Remove unneeded -Wno-dangling-field flag" 2018-12-07 21:59:21 +00:00
Chih-hung Hsieh
98f91d4f72 Merge "Switch to clang-r346389b." 2018-12-07 20:19:09 +00:00
Elliott Hughes
cc85770628 Move mkdir(1) to toybox.
Test: treehugger
Change-Id: I5fcbf33acb93cdc279a900586b96e0232c4aea87
2018-12-06 22:30:45 -08:00
Treehugger Robot
308ef76ef9 Merge "Fix: a module with sub_dir can't be placed in APEX" 2018-12-07 05:58:06 +00:00
Jiyong Park
7c2ee713ec Fix: a module with sub_dir can't be placed in APEX
This change fixes the bug that when a module is defined with sub_dir,
then build breaks when the module is included in an APEX.

This was happening because, for example when we have a prebuilt_etc
module having sub_dir set to "foo/bar", then only etc/foo/bar is added
to the canned_fs_config file and other intermediate directories (etc,
etc/foo) are not added. e2fsdroid however expects that every directories
to be listed.

Fixing the problem by adding parent directories when adding a directory
to canned_fs_config.

Bug: 120600179
Test: m (a new test case added to apex_test)
Change-Id: If712ff65761a7e1e3216371bb2eb7acf9cb5dc9e
2018-12-07 14:29:59 +09:00
Elliott Hughes
ed46164d03 Move head(1) to toybox.
Test: clean build
Change-Id: I264c320b4a63e9b0f440791dc20ff99ec910036a
2018-12-07 02:36:16 +00:00
Sundong Ahn
ba49360c51 Remove dependency on framework.jar
Remove dependency on framework.jar to reduce the build time. So sdk
libraries are not checked API whenever frameowkr.jar changes.

Test: m -j
Bug: 119625999
Change-Id: I7435c429b7857de8c3c1834757c54888091753e5
2018-12-07 02:32:40 +00:00
Treehugger Robot
d28d0ec119 Merge "Move dirname(1) to toybox." 2018-12-07 02:31:38 +00:00
Treehugger Robot
33b03f7105 Merge "DO NOT MERGE" 2018-12-07 01:38:19 +00:00
Alex Light
dfaf769841 Merge "Make apex.ApexBundleFactory public" 2018-12-07 01:34:32 +00:00
Yi Kong
d218df1b2f Remove unneeded -Wno-dangling-field flag
Test: m checkbuild
Change-Id: I4867fb80ffa901d4fef96b315cd114e6f9b82476
2018-12-06 16:43:55 -08:00
The Android Open Source Project
902590e70e DO NOT MERGE
Merge pie-platform-release (PPRL.181105.017, history only) into master

Bug: 118454372
Change-Id: I9956713bafd0e5b131a6245304af629084f29b68
2018-12-06 14:10:56 -08:00
Alex Light
ee25072e35 Make apex.ApexBundleFactory public
Art needs to be able to create an ApexBundle with a LoadHook to
support art testing using the HOST_PREFER_32_BIT=true hack.

Bug: 120617876
Test: HOST_PREFER_32_BIT=true m nothing
Change-Id: Ia11e61a92094dfbc013c6c53a6edff33371ed8e1
2018-12-06 14:02:16 -08:00