Commit Graph

3527 Commits

Author SHA1 Message Date
Mitch Phillips
a5a468f4fb Merge "Sort fuzz target dependencies to avoid rebuilds." am: 3eceaa3240 am: b60e5fbdfe
am: fa2b7a02ad

Change-Id: Ic21ddad505ed9528499cd823884a95879d0b0ae7
2019-11-11 18:58:22 -08:00
Treehugger Robot
3eceaa3240 Merge "Sort fuzz target dependencies to avoid rebuilds." 2019-11-12 02:42:10 +00:00
Nick Desaulniers
0405b29044 Merge "soong: move -Wimplicit-fallthrough from cflags to cxxflags" am: 2d5ce8538b am: 3a24eefedb
am: 0d0b3980b8

Change-Id: I8ca47f5a92926f31ff4e5c68cb46801b2183a0b1
2019-11-11 10:29:58 -08:00
Colin Cross
6458fee442 Merge "Remove -Wno-thread-safety-negative" am: 075cc44a86 am: dcee4049d6
am: a45513cc6c

Change-Id: Ie671f3ef90115260b5ee604459b33725633110a9
2019-11-11 10:06:32 -08:00
Mitch Phillips
a6ad9a074a Merge "Soong frontend for shared library fuzzing." am: 722b02f84c am: f484975c2d
am: d8e72556ad

Change-Id: Id729340c98645b6b829bc0d7c6b89b374f087e41
2019-11-11 10:06:06 -08:00
Nick Desaulniers
2d5ce8538b Merge "soong: move -Wimplicit-fallthrough from cflags to cxxflags" 2019-11-11 16:54:25 +00:00
Mitch Phillips
0553ba356e Sort fuzz target dependencies to avoid rebuilds.
Some fuzz target dependencies are generated at Soong-time in a
nondeterministic fashion. When these are interpreted by Make, they may
cause rebuilds due to being in a different order.

Ensure that the dependencies are always sorted, which should avoid
triggering unnecessary rebuilds.

Bug: 144250431
Test: make <module> && make <module>, ensure no rebuild.
Change-Id: I44edc1a3bb3f57be3e3f093f765241b41928fa4d
2019-11-11 07:46:58 -08:00
Colin Cross
075cc44a86 Merge "Remove -Wno-thread-safety-negative" 2019-11-09 02:34:29 +00:00
Colin Cross
23d988d54a Remove -Wno-thread-safety-negative
-Wthread-safety-negative was disabled because it requires locks to
support an operator!(), and std::mutex in libc++ does not.  Disabling
it everywhere was preventing it being used for modules that want to
opt in to using it and provide their own lock that supports
operator!().  Modules that use -Weverything should either stop using
 -Weverything (preferred), or add -Wno-thread-safety-negative.

Bug: 143713277
Test: m native
Change-Id: I0b84679a806a21b16cabe7f739fde61c3efe2cbe
2019-11-08 18:27:40 +00:00
Nick Desaulniers
4e31fb87af soong: move -Wimplicit-fallthrough from cflags to cxxflags
The compiler upgrade to r370808 can now check C code for implicit
fallthrough. This is triggering a massive number of warnings throughout
external/ and the rest of the platform.

Revisit enabling this for C another day.

Bug: 139945549
Test: m
Change-Id: I8dfaedab78c6230b46e8a45a9e65106dec363380
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-11-08 09:52:56 -08:00
Mitch Phillips
e1ee1a1297 Soong frontend for shared library fuzzing.
Additional context (for Googlers): go/android-fuzzing-shared

This patch adds the Soong frontend for shared library fuzzing. We
traverse dependencies at soong install time to find all transient shared
libraries that $module depends on. We then ask the Make backend to
depend on the shared library.

We also create the source:destination mappings between where the shared
libraries are built to where they should be installed to for fuzzing.
This is then depended on by the Make backend.

Bug: N/A
Test: m fuzz, note the contents of $ANDROID_PRODUCT_OUT/data/fuzz/lib,
and out/soong/fuzz-target-*.zip now has shared libraries.

Change-Id: Id7afbd34bc9c055110af96cd3c668b730d404aee
2019-11-08 08:48:13 -08:00
Martin Stjernholm
e5ed6d1b09 Merge "Revert submission of topic 'libdl_android-in-apex'" am: 3980ced987 am: 6d01bf3b82
am: 632f7546c6

Change-Id: I4b45402545bff8b2c6cd7ae4feb52442e45610d8
2019-11-08 04:17:52 -08:00
Martin Stjernholm
3980ced987 Merge "Revert submission of topic 'libdl_android-in-apex'" 2019-11-08 11:51:39 +00:00
Colin Cross
12405b69e2 Merge changes from topic "reorder-cflags" am: 1f38237c12 am: 17da9db309
am: 157df18e9a

Change-Id: I8c9f2ba120a41c1b132e63a1a1baeada454f3812
2019-11-07 21:37:09 -08:00
Colin Cross
1f38237c12 Merge changes from topic "reorder-cflags"
* changes:
  Reorder local and global flags
  Split local and global cflags
2019-11-08 05:07:34 +00:00
Jooyung Han
93249c363d Merge changes from topic "libraries-txt-to-soong" am: 3e38230af7 am: 1813458be8
am: 128c4dd453

Change-Id: I09be59d00c34eb452075eed9e20df32d41cf47d7
2019-11-07 20:25:58 -08:00
Treehugger Robot
3e38230af7 Merge changes from topic "libraries-txt-to-soong"
* changes:
  VNDK APEX contains related *.libraries.txt files
  Make vndk*.libraries.txt as soong modules
2019-11-08 04:04:14 +00:00
Jiyong Park
421f4a80fb Merge "SDK snapshot is dist'ed" am: d0a4878b49 am: ed00b7fa5f
am: 971c649b6d

Change-Id: Ib79b76b12150064d9a718cc5d4101be38032360a
2019-11-07 17:22:32 -08:00
Treehugger Robot
d0a4878b49 Merge "SDK snapshot is dist'ed" 2019-11-08 00:45:50 +00:00
Colin Cross
6d88dbad0e Reorder local and global flags
Native compiler flags are currently applied in approximately:
global cflags
local cflags
local include dirs
global include dirs
global conlyflags
local conlyflags
global cppflags
local cppflags

This means that a flag that is enabled in the global cppflags
cannot be disabled in the local cflags, and an Android.bp author
must know to disable it in the local cppflags.

The previous CL split the global and local flags into separate
variables.  Rearrange the order that the variables are applied
to be:
global cflags
global conlyflags
global cppflags
local cflags
local include dirs
local conlyflags
local cppflags
global include dirs

Bug: 143713277
Test: m native

Change-Id: I171524ab40096a636a8e549e1e4bc3347ef9f97a
2019-11-07 15:27:58 -08:00
Colin Cross
4af21ed26f Split local and global cflags
Native compiler flags are currently applied in approximately:
global cflags
local cflags
local include dirs
global include dirs
global conlyflags
local conlyflags
global cppflags
local cppflags

This means that a flag that is enabled in the global cppflags
cannot be disabled in the local cflags, and an Android.bp author
must know to disable it in the local cppflags.  A better order
would be:
global cflags
global conlyflags
global cppflags
local cflags
local conlyflags
local cppflags
local include dirs
global include dirs

We are mixing both the global and local cflags into a single
variable, and similar for conlyflags and cppflags, which
prevents reordering them.  This CL prepares to reorder them
by splitting the global and local cflags into separate variables.

Bug: 143713277
Test: m native
Change-Id: Ic55a8c3516c331dc5f2af9d00e59ceca9d3e6c15
2019-11-07 15:27:58 -08:00
Yuexi Ma
31f36fbbd1 Revert submission of topic 'libdl_android-in-apex'
Reason for revert: broke numerous major apps in app compat testing
Bug: 144100240

Change-Id: I4b43b92963815dfd95a221fb3f560505e9799950
2019-11-07 19:19:54 +00:00
Martin Stjernholm
1fec8d0000 Merge "Recognize libdl_android as a Bionic library." am: 4945e7853e am: ae79228766
am: baf7ff0af9

Change-Id: Id18ba879d96058e7474223b84a31c692f73cf6a1
2019-11-07 03:21:56 -08:00
Martin Stjernholm
4945e7853e Merge "Recognize libdl_android as a Bionic library." 2019-11-07 11:01:36 +00:00
Jooyung Han
39edb6c6c1 VNDK APEX contains related *.libraries.txt files
These files were highly coupled with vndk version, so having them inside
the corresponding VNDK APEX is reasonable.

These files are used by linkerconfig and libnativeloader. In the future,
they reference these files from and VNDK APEX.

Bug: 141450808
Test: m com.android.vndk.current
Change-Id: I055a979d2636ddd8844a0afff81f6ba441f7965e
2019-11-07 16:47:38 +09:00
Jooyung Han
2216fb1f51 Make vndk*.libraries.txt as soong modules
Migrating from Make to Soong.

These files are generated by singleton and had to be defined as PREBUILT
modules in Make (system/core/rootdir/Android.mk)

Now, they are converted as soong modules.

To make things easier, a special kind of module 'vndk_libraries_txt' is
added which works like prebuilt_etc but its src file is generated by
soong.

Bug: 141450808
Test: m llndk.libraries.txt
Change-Id: Ia77e6af73f760fcd77020218c5bc37892b2cda1f
2019-11-07 15:12:03 +09:00
Jiyong Park
232e785b98 SDK snapshot is dist'ed
`m module_sdk dist` produces snapshots of all SDKs in the source tree.
A snapshot is a zip file consists of Android.bp, exported headers,
exported AIDL files, stubs for native libs and jars. The zip file is
expected to be downloaded from the build server and extracted to a
directory (which probably will be
/prebuilts/module_sdks/<module_name>/current).

Bug: 138182343
Test: m (sdk_test.go updated)

Change-Id: Idbe4bc24795fe08f26fc1cf7497028f9d162053a
2019-11-07 12:24:48 +09:00
Fabien Sanglard
1f8a6790bf Merge "Fix Soong CMakeLists.txt generator" am: 267e406830 am: eeb9ad6415
am: 9a4292b91f

Change-Id: I15a44d78dbebeacf434e922d4b644e2ecc33937c
2019-11-06 16:07:36 -08:00
Fabien Sanglard
267e406830 Merge "Fix Soong CMakeLists.txt generator" 2019-11-06 23:41:28 +00:00
Ramy Medhat
8af6b81a91 Merge "Run non-RBE supported actions in the local pool when USE_RBE is set." am: 75c82fb518 am: a64d8aecff
am: 60cac6c7a3

Change-Id: Iae99c1271d90a265e1d34594595c6e92830e8bc7
2019-11-06 11:19:54 -08:00
Ramy Medhat
75c82fb518 Merge "Run non-RBE supported actions in the local pool when USE_RBE is set." 2019-11-06 18:36:18 +00:00
Fabien Sanglard
33ca8080e5 Fix Soong CMakeLists.txt generator
Problem: Soong does not guarantee that the list of parameters will
be in individual strings. This means the CMakeLists generator can
receive as input:

  params = {"-isystem", "path/to/system"}

or it could receive:

  params = {"-isystem path/to/system"}

Solution: Normalize the list of parameters into a flattened list
of parameters where each parameters is in an individual string.

Fixes: 143378093
Test: None
Change-Id: I9bd1a2006a1cf0ba383f467748b6fd4eadef6866
2019-11-05 16:26:37 -08:00
Martin Stjernholm
f4ed8df84d Recognize libdl_android as a Bionic library.
Necessary to create the symlinks from /system/lib{,64} to the Runtime APEX.

Test: build & boot
Bug: 135753770
Change-Id: I231b4ec48869843de233ebb7c2e4fc5a49e7288a
2019-11-06 00:22:37 +00:00
Ramy Medhat
dd0418a4d4 Run non-RBE supported actions in the local pool when USE_RBE is set.
Bug: 143938974
Test: ran CTS build at -j500 successfully.
Change-Id: I55074bd67308cd716972e24fb56a20bc393d5d9d
2019-11-05 22:57:35 +00:00
Inseob Kim
bc27c76b1a Merge "Fix and generate vndk snapshot entirely in Soong" am: fe0c50e0d0 am: 44df62da53
am: b80ee9d09b

Change-Id: I6912b1fcda6ef30ff0119e924e1584371d5516d7
2019-11-05 10:44:10 -08:00
Inseob Kim
242ef0c4de Fix and generate vndk snapshot entirely in Soong
- VNDK snapshot now respects stem and suffix.
- ld.config.txt is removed from snapshot as linkerconfig has become default.
- Soong builds entire snapshot, and make just calls dist-for-goals.

Bug: 142589718
Test: build and install snapshot
Test: development/vndk/snapshot/update.py with past version of snapshot
Change-Id: Id1ed658c22bb2e41c0ee50d1fe2a97924a76d7dc
2019-11-04 17:03:25 +09:00
Inseob Kim
fcbb526076 Merge "Fix vendor variants generation of vndk" am: f68f98eeb6 am: 3af01a3fc9
am: ad18218113

Change-Id: I14eebbeaa066da04d95bb7d68357354ac96d0d74
2019-11-03 18:22:46 -08:00
Treehugger Robot
f68f98eeb6 Merge "Fix vendor variants generation of vndk" 2019-11-04 02:00:41 +00:00
Jooyung Han
7f1ac2c35a Merge "delete redundant code" am: 1f056cd69d am: 4608595e74
am: cd8be8bb61

Change-Id: I95c13e34d2aabb7e77375c94aa01168a74afca9b
2019-11-01 12:00:33 -07:00
Treehugger Robot
1f056cd69d Merge "delete redundant code" 2019-11-01 18:15:33 +00:00
Inseob Kim
bc093672ed Fix vendor variants generation of vndk
Current routine to check whether BOARD_VNDK_VERSION variant is created
or not is not correct, because only non-VNDK modules are installed in
/vendor. Thus, BOARD_VNDK_VERSION variants should only be created with
non-VNDK modules.

Bug: N/A
Test: m nothing
Change-Id: I2ee7821fce407214ac6be4f4b6d62483c907971f
2019-11-01 13:28:59 +09:00
Jooyung Han
21d2bcc106 Merge "Soong generates vndk-related .libraries.txt files" am: 7acbfc033d am: ed3d5d730b
am: 76daab7a04

Change-Id: I85fab7585e3cf73601ffc1dbc133cf42364f3c60
2019-10-31 19:24:52 -07:00
Jiyong Park
5cc4a3433f Merge "native shared libs in an SDK can be snapshotted" am: 40dfbe3a16 am: 2c4966ad65
am: 0d3c428390

Change-Id: I8582547239d687ba5db88fe276a46d85f36dbca9
2019-10-31 18:59:48 -07:00
Jooyung Han
7acbfc033d Merge "Soong generates vndk-related .libraries.txt files" 2019-11-01 01:57:50 +00:00
Treehugger Robot
40dfbe3a16 Merge "native shared libs in an SDK can be snapshotted" 2019-11-01 01:23:35 +00:00
Jooyung Han
a463f720aa delete redundant code
no need to use separate test-only key for config.Once().

Test: m
Change-Id: I9e05d413504114df8f8ea8d9ef521db1d5da5d01
2019-11-01 09:00:11 +09:00
Jooyung Han
0302a84ddc Soong generates vndk-related .libraries.txt files
This is a follow-up CL of I9a24f6975bd4b226a94f61a13d43857dcdce6b88

Generated files are passed to make via MakeVars:
- SOONG_LLNDK_LIBRARIES_FILE
- SOONG_VNDKCORE_LIBRARIES_FILE
- SOONG_VNDKSP_LIBRARIES_FILE
- SOONG_VNDKPRIVATE_LIBRARIES_FILE
- SOONG_VNDKCOREVARIANT_LIBRARIES_FILE
- SOONG_VNDK_LIBRARIES_FILE

Previously filenames were "guessed" from module names. Now VndkMutator
stores filenames as well and generate those files with them.

Bug: 142963962
Bug: 141450808
Test: m && device boots && TH
Change-Id: I0c248b707188f904df60ead50059fefe90bfd17f
2019-11-01 04:35:21 +09:00
Kris Alder
9b7fdbf885 Merge "change output file extension (config.txt -> config.json)" am: 5d0b3b7195 am: edf33a3253
am: 67618b11dc

Change-Id: I6232e336e7812b73ecbde4b76fc78c6ac00d03c0
2019-10-30 22:27:28 -07:00
Kris Alder
5d0b3b7195 Merge "change output file extension (config.txt -> config.json)" 2019-10-31 04:59:55 +00:00
Jooyung Han
57498b64ca Merge "apex: __ANDROID_APEX__ defined with no value" am: bdad6c378f am: 15e234ef49
am: f3061ff6b5

Change-Id: I47a2799c6e619ad052c363c1975fd87392f93107
2019-10-30 17:21:58 -07:00