Commit graph

9245 commits

Author SHA1 Message Date
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
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
Chih-Hung Hsieh
1017b37654 Undo workaround of flag filtering.
* Now header-abi-dumper does not complain about -fno-sanitize=implicit-integer-sign-change

Bug: 119558057
Test: make checkbuild
Change-Id: I80be08dd5aa184498bdbb83b42b877dbec152165
2018-12-06 12:12:41 -08:00
Chih-Hung Hsieh
a910d83a41 Switch to clang-r346389b.
Bug: 120551946
Test: make checkbuild, boot, go/clang-r346389b-testing
Change-Id: I71e28ee97cb02b6be71847b53fbb05007c936e34
2018-12-06 11:18:28 -08:00
Dan Albert
899c23e19b Add flag to disable source directory includes.
Not all projects can be built when their base directory (the
directory containing the Android.bp file) is automatically included.
For example, external/jsoncpp has a file named version, which will
override the standard library's <version> header.

It would maybe be reasonable for this to be on by default, but many
projects in the tree currently depend on this behavior.

Test: make checkbuild
Bug: None
Change-Id: I58dff2689270ae56fef7cf83be31262d16794fc4
2018-12-06 11:04:03 -08:00
Elliott Hughes
2ebfd495cf Move dirname(1) to toybox.
Test: treehugger
Change-Id: Ie1ffbfb900803940620dd11a7ed6bfda76bee86c
2018-12-06 08:57:31 -08:00
Treehugger Robot
080c2455a3 Merge "Move to toybox unix2dos(1)." 2018-12-06 16:52:47 +00:00
Jerome Gaillard
82bb8b1359 Upgrade Windows default build version from Vista to 7
This is needed to build libicui18n on Windows, as it depends on APIs
created in Windows 7 (ResolveLocaleName).

Test: sdk build
Change-Id: If64510a262f7f1d4d356b1a9960ceea114cfa78a
2018-12-06 12:39:12 +00:00
Martin Stjernholm
53afe27ef9 Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag"" 2018-12-06 12:33:30 +00:00
Martin Stjernholm
f993e7797d Revert "Remove unneeded -Wno-constant-logical-operand flag"
This reverts commit 4f0ce757aa.

Reason for revert: Breaks several targets in internal git_master, e.g. http://ab/5165971.

Test: Build failing library
Change-Id: I02a5ade05a76b24020586c55a4e8f441ca7708a9
2018-12-06 12:17:40 +00:00
Elliott Hughes
5172a8b50e Move to toybox unix2dos(1).
This removes the need for the confusingly named "todos".

Test: treehugger
Change-Id: Id8931deb00a06d54262b2803a00d13bd4de88f12
2018-12-05 19:42:43 -08:00
Treehugger Robot
a7a432fb82 Merge "Remove unneeded -Wno-constant-logical-operand flag" 2018-12-06 03:36:11 +00:00
Treehugger Robot
2ae2759824 Merge "Move to toybox cmp(1)." 2018-12-06 02:16:53 +00:00
Peter Collingbourne
60045811c0 Merge "Stop mapping c++17 to c++1z." 2018-12-06 02:07:31 +00:00
Yi Kong
4f0ce757aa Remove unneeded -Wno-constant-logical-operand flag
Test: m checkbuild
Change-Id: If1ec62b6d88b8260c9ec39e0d63a379e7ae573e9
2018-12-06 00:18:05 +00:00
Treehugger Robot
a0aaf2f43e Merge "Add zip-apex" 2018-12-05 22:37:35 +00:00