Commit Graph

4020 Commits

Author SHA1 Message Date
Steven Moreland
e7b5b72015 vndkMustUseVendorVariantList += vintf-vibrator
TARGET_VNDK_USE_CORE_VARIANT devices explicitly track libs which are
differentiated between system/vendor. b/145157349 is filed to try to
catch these errors during normal builds (or in presubmit).

aidl libs need to be differentiated because they explicitly set
different system/vendor stabilities.

Fixes: 145154788
Test: fixes build
Change-Id: I682ceaa2dd23f0f80ba060ae262d766b1367187e
2019-11-25 15:21:44 -08:00
Colin Cross
dce17fa832 Merge changes I0dcc9c7b,I9bc40642 am: 09ef474b6f am: dc5ae0ee6a
am: adac91844b

Change-Id: I4ea46273aec2b36d7d7d140d4b5f1a6efbbfe939
2019-11-25 14:48:14 -08:00
Colin Cross
09ef474b6f Merge changes I0dcc9c7b,I9bc40642
* changes:
  Move cc.imageMutator into the android package
  Make CreateVariations return []android.Module
2019-11-25 22:30:17 +00:00
Colin Cross
1e70757891 Make TestContext.RegisterModuleType take an android.ModuleFactory am: 4b49b768a2 am: 89169a36dd
am: ac3fe4d8ae

Change-Id: I7c0e5d743434231ec8784e1bb9ba7dc12d7c0c07
2019-11-25 14:28:57 -08:00
Colin Cross
4b49b768a2 Make TestContext.RegisterModuleType take an android.ModuleFactory
Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.

Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
2019-11-25 10:59:44 -08:00
Evgenii Stepanov
64bee4decf Add -instcombine-lower-dbg-declare to hwasan flags.
This is a workaround to improve hwasan reports involving stack
variables.

Bug: 112437883
Test: SANITIZE_TARGET=hwaddress, build and boot

Change-Id: I21ea2fdd2d1f04e2bb9b9847785c00a951030c74
2019-11-22 18:40:07 -08:00
Colin Cross
4179bf95ba Merge "Make fuzz rules reproducible" am: 87847f7280 am: 2d42ef51d2
am: 4fc208edc9

Change-Id: I361999e3de2ec083468c04b7842620cbcc000279
2019-11-22 12:13:29 -08:00
Treehugger Robot
87847f7280 Merge "Make fuzz rules reproducible" 2019-11-22 19:09:42 +00:00
Ivan Lozano
d201caf19d Merge "Allow cc.LinkabeInterfaces to request "" variants." am: 3bc70db398 am: 239c81f2e0
am: 87af635df0

Change-Id: If00bc4b7c0aa4f43ffb20569a30c67b6d4dfd965
2019-11-21 18:58:09 -08:00
Jiyong Park
4f64217110 Merge "symbols in stub library isn't affected by -fvisibility=hidden" am: 66278b6224 am: e3dfb51c8c
am: 31a7aa8b09

Change-Id: I4f4c4bcf89fe30def4e84e710ddf3c848adb73fa
2019-11-21 18:56:37 -08:00
Ivan Lozano
3bc70db398 Merge "Allow cc.LinkabeInterfaces to request "" variants." 2019-11-22 00:24:23 +00:00
Treehugger Robot
66278b6224 Merge "symbols in stub library isn't affected by -fvisibility=hidden" 2019-11-22 00:22:48 +00:00
Ivan Lozano
2b26297dc7 Allow cc.LinkabeInterfaces to request "" variants.
cc.LinkableInterfaces should be able to request if an empty variant is
required from the LinkageMutator. We were previously assuming that if only
static or shared libraries were being built, then we didn't need the
empty variant. However this should be explicit to handle cases where the
default set of variants being created may not include both static and
shared libraries.

Bug: 144861059
Test: m -j crosvm.experimental
Change-Id: I66724bdc16ff350b06dfa4d049c82f33019979a5
2019-11-21 13:25:08 -08:00
Colin Cross
dc809f9bc5 Make fuzz rules reproducible
Use lists instead of maps to make the order and contents of fuzz
packaging rules reproducible.

Test: m nothing; touch Android.bp; m nothing
Change-Id: Id11323f7528e594370c391bfe82eb7367bc1bcd5
2019-11-21 11:03:23 -08:00
Martin Stjernholm
c41ffd9767 Merge "Reland "Recognize libdl_android as a Bionic library"." am: d0738b3608 am: 6be9b91b79
am: fa08f7ae9a

Change-Id: I51ee1d9e3613a798aa61b6eeb9d8d1be43b98a21
2019-11-21 08:40:55 -08:00
Jiyong Park
48d75efa6f symbols in stub library isn't affected by -fvisibility=hidden
Fixing the bug that -fvisibility=hidden in a cc_library is used even
when compiling stub.c file where the symbols shouldn't be hidden.

Bug: 144781653
Test: add folowing to libEGL and build
+    stubs: {
+        symbol_file: "libEGL.map.txt",
+        versions: ["29"],
+    },

Change-Id: Iab70f36a4fb98737fc35827dbc9e1ca1a99d4354
2019-11-21 15:11:49 +09:00
Colin Cross
7228ecd5e3 Move cc.imageMutator into the android package
Prepare for making the image mutator available to all modules and
moving it between the os and arch mutators by moving it into the
android package and using an interface implemented by the module
types to control it.

Bug: 142286466
Test: No unexpected changes to out/soong/build.ninja
Change-Id: I0dcc9c7b5ec80edffade340c367f6ae4da34151b
2019-11-20 15:21:32 -08:00
Martin Stjernholm
203489b321 Reland "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
Bug: 144343305
Change-Id: I221bed87a85f18c927ba44ee75b7db75316c1f49
2019-11-19 16:35:47 +00:00
Mitch Phillips
ae82283e9e Merge changes Idea4f04c,I3b85ef66 am: 6dd78bdda0 am: ff2da83225
am: 80a34b5936

Change-Id: I500f352dd565d630d0379eec5e3322593f17b646
2019-11-14 20:47:27 -08:00
Treehugger Robot
6dd78bdda0 Merge changes Idea4f04c,I3b85ef66
* changes:
  Add $$ORIGIN/lib to rpath for fuzz targets.
  Prebuilt shared libraries should be collected for fuzz targets.
2019-11-15 04:26:22 +00:00
Ivan Lozano
ac7f3cebbe Merge "Allow cc modules to pull in rust includes." am: 36396b26ef am: b6eddf33c0
am: 7e93f62567

Change-Id: I198ebf22a3dabecad9d54c854e96c169e1968fc1
2019-11-14 18:50:38 -08:00
Ivan Lozano
36396b26ef Merge "Allow cc modules to pull in rust includes." 2019-11-15 02:32:26 +00:00
Mitch Phillips
1f7f54f441 Add $$ORIGIN/lib to rpath for fuzz targets.
RPATH needs to be set to traverse the local directory's lib folder for
fuzz target packages.

Bug: N/A
Test: m fuzz
Change-Id: Idea4f04ce4c55315df7e808de5b2b4f06a88d82a
2019-11-14 15:08:59 -08:00
Mitch Phillips
1f6ba39697 Merge "Package fuzz targets into zipfiles, then coalesce." am: ed0070d453 am: 6efa5852b3
am: ab94bc0bc0

Change-Id: I46b6293359232d590144b60e766e8c27382e7aab
2019-11-14 11:04:17 -08:00
Mitch Phillips
f50bddb790 Prebuilt shared libraries should be collected for fuzz targets.
Currently, prebuilt shared libraries fail the linkable.CcLibrary()
check, as the module returned by NewPrebuiltSharedLibrary uses a
prebuiltLibraryLinker as the module.linker, rather than a
libraryDecorator (which is the check by CcLibrary()).

We also need to ensure that we discard LLNDK stubs libraries, so we
manually categorise and discard them as well. They unfortunately are are
cc.Modules that aren't CcLibraries, as they use a custom linker object
as well (stubDecorator).

Fixes: 144415986
Test: m fuzz
Change-Id: I3b85ef66d1602cb8c035a0a90bddf30674e2eb71
2019-11-14 11:02:50 -08:00
Mitch Phillips
ed0070d453 Merge "Package fuzz targets into zipfiles, then coalesce." 2019-11-14 18:37:48 +00:00
Mitch Phillips
2edbe8e6ed Package fuzz targets into zipfiles, then coalesce.
Instead of writing all fuzz target files into a huge zipfile (by number
of entries), we instead write each fuzz target and its files to a
zipfile, then coalesce them into a big zipfile.

This should simplify the repackager significantly, as no unzipping and
repackaging should be needed (just renaming).

This also solves b/144418402, where we are very close to hitting the
POSIX args limit on the soong_zip command for the device fuzz package,
due to the line length generated by all the entries in the huge zipfile.

Fixes: 144418402
Test: make fuzz
Change-Id: I89797e1bea2691ff4a33a227306f2f9083d8af6e
2019-11-14 08:14:24 -08:00
Ivan Lozano
e0833b1f5c Allow cc modules to pull in rust includes.
Make sure LinkabeInterfaces can export include dirs to cc modules. This
fixes the Rust implementation and makes sure these are pulled in for cc
modules.

Bug: 144052093
Test: cc module depending on a rust library includes dirs correctly.
Change-Id: I6b5d5e6ab6afb507178b4f2cbdc45f01031dbfe4
2019-11-14 07:23:26 -08:00
Jooyung Han
5e0bfd200c Merge "make ApexProperties defaultable" am: c5c4d18db0 am: 53b46ff2e9
am: a18014915f

Change-Id: I0c1a56d102eff5d7c83795f0e351be58f633987e
2019-11-13 17:04:30 -08:00
Jooyung Han
c5c4d18db0 Merge "make ApexProperties defaultable" 2019-11-14 00:42:43 +00:00
Colin Cross
f8535feeae Merge "Forbid -Weverything" am: f3898e3bef am: c0e94d6894
am: b4f00f7b05

Change-Id: I285b4dde0afb2f73921ac4fda447528ca4980d29
2019-11-13 08:23:56 -08:00
Colin Cross
f3898e3bef Merge "Forbid -Weverything" 2019-11-13 15:01:48 +00:00
Jooyung Han
18020eabc4 make ApexProperties defaultable
ApexPropreties are added in InitApexModule() and they are supposed to be
defaultable. To be defaultable, InitApexModule() should be called before
InitDefaultableModule().

Bug: 144332048
Test: m (soong test added)
Change-Id: I6c90ed3b66a086292a4c0ecb37c61f83769e62bd
2019-11-13 05:52:57 +00:00
Jiyong Park
92d6bc189c Rename # vndk tag to # llndk
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.

In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.

Exempt-From-Owner-Approval: cherry-pick from internal gerrit

Bug: 143765505
Test: m
Test: python3 test_gen_stub_libs.py
Merged-In: I2853df3b6e245056c21d4ab3d62466954cf26d72
(cherry picked from commit 3d7b69a657)
Change-Id: I2853df3b6e245056c21d4ab3d62466954cf26d72
2019-11-13 05:50:27 +00:00
TreeHugger Robot
7f2d7a86b8 Merge "Rename # vndk tag to # llndk" 2019-11-13 00:31:34 +00:00
Colin Cross
39ef52f1df Forbid -Weverything
Use of -Weverything blocks build system changes and toolchain updates
on new warnings.  Forbid it in the build system.  Developers can
experiment with -Weverything on their module by adding it to their
Android.bp file and building with
m ANDROID_TEMPORARILY_ALLOW_WEVERYTHING=true

Fixes: 143713277
Test: manual
Change-Id: If154db328c52f687161e7a41e486d56a129850ac
2019-11-12 15:55:03 -08:00
Mitch Phillips
ea4aefd269 Merge "'m fuzz' shared lib package should be per-fuzzer." am: 38dec1bcb5 am: fd869a69c7
am: 6796abbe9a

Change-Id: I2e2447898467f7101271449268bb0783ace96741
2019-11-12 14:30:23 -08:00
Treehugger Robot
38dec1bcb5 Merge "'m fuzz' shared lib package should be per-fuzzer." 2019-11-12 22:13:36 +00:00
Mitch Phillips
13ed3f5e34 'm fuzz' shared lib package should be per-fuzzer.
Change the ClusterFuzz package built by 'make fuzz' to now package
shared libraries per-fuzz target.

Changes documented in go/proposed-clusterfuzz-package

This has the impact of:
 - This package is much easier to post-process in the Haiku export
 cronjob.
 - Shared libraries are now per-fuzz-target. This means that we will
 have some level of duplication (libdl, libc, libc++, libclang_rt.*,
 etc.) as these libraries will be in multiple fuzz target's dirs.

This *only* affects the fuzz-$target-$arch.zip file, not the fuzz targets in
$ANDROID_HOST_OUT/fuzz or $ANDROID_PRODUCT_OUT/data/fuzz. These two
install directories still use the global shared libraries in order to
preserve space on devices.

Bug: 144360679
Test: m fuzz
Change-Id: I5f19a13070e01d2d39598f9f215a983b398a9f37
2019-11-12 11:12:10 -08:00
Nick Desaulniers
59ccc23e26 Merge "Expand ClangExtraExternalCflags to non-Google vendor projects" am: 69c013694d am: ebc13b056c
am: 5d53e272f4

Change-Id: I0de8fe352e6c24fde0950e915d84469d5af59f8c
2019-11-12 10:22:10 -08:00
Nick Desaulniers
69c013694d Merge "Expand ClangExtraExternalCflags to non-Google vendor projects" 2019-11-12 17:45:15 +00:00
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
Yi Kong
950e0baf2a Expand ClangExtraExternalCflags to non-Google vendor projects
Some of the warnings are too common to fix/opt-out for non-Google
projects.

Also in the change, minor clean up of duplicated code.

Test: presubmit
Bug: 139945549
Change-Id: Ic176ef1f17133405851a79592b6bef5ccb403bd9
2019-11-11 13:24:39 -08: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