Commit graph

9245 commits

Author SHA1 Message Date
Dimitry Ivanov
53c21b7152 Merge "Make filegroups work for library.Shared/Static.Srcs" 2018-12-05 22:13:33 +00:00
Chih-hung Hsieh
89dbee61ff Merge "Switch to clang-r346389." 2018-12-05 18:24:12 +00:00
Elliott Hughes
6646904a47 Move to toybox cmp(1).
Test: treehugger
Change-Id: Idf5c9f00d0698aca6ceab2956c7dc49ad7c604e1
2018-12-05 10:03:31 -08:00
dimitry
0345ad8073 Make filegroups work for library.Shared/Static.Srcs
Add dependencies for source modules when they are referenced in
library.Shared/Static.Srcs. Use ExpandSources to expand filegroups
for these properties.

Bug: http://b/120534727
Test: make
Change-Id: I58d02d8f7d60026abbcde75298c7a61b27bdbf12
2018-12-05 15:31:10 +00:00
Haibo Huang
47c9d4c8a3 Remove denver from soong
Test: build
Change-Id: If740c2aaa321dee01f5d99c37171390e15f62c62
2018-12-04 19:39:48 -08:00
Treehugger Robot
d00bbd72f4 Merge "Move to toybox basename(1)." 2018-12-05 01:09:01 +00:00
Treehugger Robot
4322f4008f Merge "Fix mac build w/echo -n" 2018-12-05 00:53:46 +00:00
Peter Collingbourne
d7225eaac4 Stop mapping c++17 to c++1z.
Clang has been accepting -std=c++17 since August 2017.

Change-Id: Iebb91438ba26b3cc4dbbdcd86e15c9df5901f402
2018-12-04 16:46:27 -08:00
Elliott Hughes
6141a7d7ff Move to toybox basename(1).
Test: treehugger
Change-Id: I29f210d86a0dada8a40eca1919e2f6f876d50bcd
2018-12-04 13:42:46 -08:00
Alex Light
5098a612fc Add zip-apex
This adds support for an apex-like file where the payload is a zip
file instead of a FS image. This makes it easier to examine and use
without root. These can also be built for the host.

This can be controlled using the 'type' modifier in the apex build
rule. 'type' may be "image" to build an apex file called {name}.apex
with an FS image payload, "zip" to build an apex with called
{name}.zipapex with a zip-file payload or "both" to build both. By
default we will use "image".

This also adds support for setting apex rules to
"host_supported: true".

Test: cd art/build/apex; mma; examine the com.android.runtime.host.zipapex
      artifact.
Test: go test android/soong/apex -v
Bug: 120436895

Change-Id: I534d330672211ac5ccc3bd5a0c89b9fc507bf51e
2018-12-04 13:10:17 -08:00
Dan Willemsen
83f97aed95 Fix mac build w/echo -n
Soong doesn't wrap everything in bash, but relies on the ninja default
of /bin/sh. We should probably improve that in the future, but for now,
just fix the build.

On Mac, /bin/sh and /bin/bash are both bash, but /bin/sh implies `set -o
posix`, and ignores the `-n` flag.

Test: treehugger
Test: build on a mac
Change-Id: Icf41b1c5a1ce9eb0a56e39e68c433fc80b53620f
2018-12-04 13:06:02 -08:00
Haibo Huang
f46b1cb06e Remove denver64 from soong
Test: build
Bug: 73545680
Change-Id: I6b213a1d83275c566fd6142a07550094240528c4
2018-12-04 21:01:50 +00:00
Chih-Hung Hsieh
3567e62f97 Switch to clang-r346389.
* Add -fno-sanitize=implicit-integer-sign-change when
  there is any integer related sanitizer, and this check
  is not explicitly specified.
  Android core does not boot with this new sanitizer yet.
* Filter out -fno-sanitize=implicit-integer-sign-change
  from tooling flags.

Bug: 119329758
Bug: 119557795
Test: make checkbuild, boot, go/clang-r346389-testing
Change-Id: I709de569cb73d070fc4958e2b4387f4041bc5438
2018-12-04 19:50:45 +00:00
Jiyong Park
ce16f3bac8 Merge "Stubs variant is used when building for APEX" 2018-12-04 14:07:56 +00:00
Yi Kong
3a33fe535e Merge "Revert "Revert "Remove unnecessary warning suppression""" 2018-12-04 09:30:54 +00:00
Jiyong Park
25fc6a9cc9 Stubs variant is used when building for APEX
When a native module is built for an APEX and is depending on a native
library having stubs (i.e. stubs.versions property is set), the stubs
variant is used unless the dependent lib is directly included in the
same APEX with the depending module.

Example:

apex {
    name: "myapex",
    native_shared_libs: ["libX", "libY"],
}

cc_library {
    name: "libX",
    shared_libs: ["libY", "libZ"],
}

cc_library {
    name: "libY",
    stubs: { versions: ["1", "2"], },
}

cc_library {
    name: "libZ",
    stubs: { versions: ["1", "2"], },
}

In this case, libX is linking to the impl variant of libY (that provides
private APIs) while libY is linking to the version 2 stubs of libZ. This is
because libY is directly included in the same apex via
native_shared_libs property, but libZ isn't.

Bug: 112672359
Test: apex_test added
Change-Id: If9871b70dc74a06bd828dd4cd1aeebd2e68b837c
2018-12-04 17:46:22 +09:00
Treehugger Robot
2098eb8c2a Merge "VNDK lib must not have product_specific: true" 2018-12-04 08:39:35 +00:00
Treehugger Robot
990b4b6e7e Merge changes from topic "python_entry_point"
* changes:
  python par: trim and convert the entry point at build time
  Fix par file zip offsets
2018-12-04 07:11:23 +00:00
Dan Willemsen
6f3e24ab55 Merge "Apply system_shared_libs to static libraries" 2018-12-04 06:19:08 +00:00
Justin Yun
9357f4aeda VNDK lib must not have product_specific: true
VNDK libs are system defined libraries. They must not be product
specific. Adding sanity check and a test to prevent setting
`product_specific: true` on VNDK libs.

Bug: 119575107
Test: building a vndk lib with 'product_specific: true,'
      must return error.

Change-Id: Ie0326540a692573f076ee08baf5d2e2f09d1007e
2018-12-04 14:10:59 +09:00
Yi Kong
734a07c66d Revert "Revert "Remove unnecessary warning suppression""
This reverts commit afedf3bdc9.

Build failure fixed.

Change-Id: I46e7e222c2b5bfa5b1846f3fe87444afb70f1b31
2018-12-04 00:42:27 +00:00
Dan Willemsen
54c5b61f0a python par: trim and convert the entry point at build time
Instead of doing these string operations in the C++ code at every
startup of an embedded par, trim and convert the entry point file to a
python module path at build time.

Test: m
Change-Id: I04a6459a80c84a704b8a25a144ab1e19622d6cc3
2018-12-03 15:58:45 -08:00
Dan Willemsen
263dde779e Fix par file zip offsets
The zip file format does support scripts/programs prefixed to the
archive, though many of the offsets are supposed to start from the
beginning of the file. Some tools (python and zipinfo) are able to
read zip files with arbitrary prefixes, but others (libziparchive and
zipdetails) fail.

So pass the file to prefix onto the zip file into merge_zips so that we
can set the offsets from the real start of the file.

Test: m sepolicy_tests  (runs the embedded python interpreter)
Test: zipinfo out/host/linux-x86/bin/sepolicy_tests
Test: zipdetails out/host/linux-x86/bin/sepolicy_tests
Change-Id: If73d4c2465581f7de5aa47959284ecf2059df091
2018-12-03 15:55:15 -08:00
Dan Willemsen
3a26eefdbe Apply system_shared_libs to static libraries
Even though we aren't doing any linking for static libraries, the
default libraries (libc, libm, libdl) are now exporting headers, so we
should be using those for both static and shared libraries (especially
when re-using objects between the two). Without this we've been in a
state where a cc_library will compile differently than a
cc_library_shared, as we'd re-use the compilation units from the static
variant in the shared library.

This does require marking many of libc's dependencies as not using libc
with system_shared_libs, otherwise we run into dependency loops.

Test: treehugger
Change-Id: Ie42edc5184f315f998db953594e425214b810e0e
2018-12-03 15:38:39 -08:00
Treehugger Robot
314d8c142c Merge "Move setsid(1) to toybox." 2018-12-03 21:49:53 +00:00
Treehugger Robot
5b46a085d7 Merge "Add sanitizer runtime library to recovery when needed." 2018-12-03 20:42:37 +00:00
Treehugger Robot
89df00c216 Merge "Do not generate SHT_RELR relocations before API 28" 2018-12-03 18:40:59 +00:00
Elliott Hughes
5728fb536f Move setsid(1) to toybox.
Test: treehugger
Change-Id: I8caf9dbbb671218379c309e698f23e7c964f1a18
2018-12-03 10:14:52 -08:00
Treehugger Robot
ddefe27f12 Merge "Move tee(1) to toybox." 2018-12-03 18:08:32 +00:00
Pirama Arumuga Nainar
7ef2700761 Merge "Use libucrt instead of libmsvcr110" 2018-12-03 17:53:43 +00:00
Yi Kong
cf492adb34 Merge "Revert "Remove unnecessary warning suppression"" 2018-11-30 23:20:11 +00:00
Jaewoong Jung
acb51e1015 Merge "Use debug mode when running R8 for eng builds." 2018-11-30 22:40:29 +00:00
Zhizhou Yang
9100b1d83d Do not generate SHT_RELR relocations before API 28
This patch fixes an issue that SHR_RELR relocation is not supported by
SDK version earlier than API 28. We only turn it on when SDK is not
used, or SDK version is newer than or equal to API 28.

Test: m -j48 for aosp_taimen-userdebug
Bug: http://b/119086751
Change-Id: I33124ae4f35fb8c00ae9103e8c04e2d4ccd5fec3
2018-11-30 22:07:35 +00:00
Elliott Hughes
3633e8641e Merge "C++17: switch the default." 2018-11-30 22:03:45 +00:00
Pirama Arumuga Nainar
087bba7356 Use libucrt instead of libmsvcr110
Bug: http://b/117796718

ucrt is either preinstalled in newer Windows or can be installed in
older Windows, whereas a dependence on msvcr110 doesn't work on Windows
without additional dependencies.

Test: Run generated binaries on Windows VM (7, 8, and 10) without
installing any extra dependencies.

Change-Id: Ibfaea5d78ac85ff4eeed35c97ad8cae4b44dadbc
2018-11-30 21:42:33 +00:00
Vishnu Nair
afedf3bdc9 Revert "Remove unnecessary warning suppression"
This reverts commit ee53a98e31.

Reason for revert: build break

Change-Id: I065b702d6eaa2e72d47a2b7a404fdd7fe51661c3
2018-11-30 21:01:30 +00:00
Elliott Hughes
1ff2b5d34c Move tee(1) to toybox.
Test: treehugger
Change-Id: Idf7fc37d6e84c295410f71dfc1ad9e460d7f7461
2018-11-30 12:36:44 -08:00
Treehugger Robot
3b67794d7f Merge "Move xxd(1) to toybox." 2018-11-30 20:14:35 +00:00
Yi Kong
da5cf6a7f3 Merge "Remove unnecessary warning suppression" 2018-11-30 19:24:35 +00:00
Elliott Hughes
34e4e416e7 C++17: switch the default.
Bug: http://b/111067277
Change-Id: I07af7cd9e65a6e238d7d256c65927fe128a0f052
Test: builds
2018-11-30 16:03:06 +00:00
Jaewoong Jung
1d6eb68731 Use debug mode when running R8 for eng builds.
Bug: 119601874
Test: Built for different variants.
Change-Id: I2250587eb3e457ca15265eb9f8359872e9b08363
2018-11-30 15:23:16 +00:00
Nikita Iashchenko
a9e5a40bb8 Merge "Revert "C++17: switch the default."" 2018-11-30 14:27:16 +00:00
Jerome Gaillard
ba0653cdb4 Merge "Add flags for Windows assembly builds" 2018-11-30 12:30:06 +00:00
Nikita Iashchenko
7a782203b9 Revert "C++17: switch the default."
This reverts commit c35fc0e130.

Reason for revert: fix broken targets in the internal master.

Change-Id: I70447a05ae5b2afa7efc7ab21c0432e651cab1ba
2018-11-30 11:15:16 +00:00
Anton Hansson
6641b97d13 Merge "Remove obsolete flag" 2018-11-30 09:11:28 +00:00
Treehugger Robot
b44bdb2be3 Merge "C++17: switch the default." 2018-11-30 08:06:02 +00:00
Elliott Hughes
f3f3b99bb3 Move xxd(1) to toybox.
Test: treehugger
Change-Id: I906b0c94da5b65dc387ae253492356ca78f93fd2
2018-11-29 22:04:16 -08:00
Treehugger Robot
ca62abc776 Merge "Move paste(1) to toybox." 2018-11-30 01:06:08 +00:00
Evgenii Stepanov
98f5b0642c Add sanitizer runtime library to recovery when needed.
Make sanitized targets in recovery depend on ".recovery" flavor of
sanitizer runtime library. This forces installation of the runtime
library in recovery image as long as at least one target depends on it.

Test: hwasan build can boot into recovery
Bug: 112438058
Bug: 119582521
Change-Id: I1b7f9fa4ff5f29acb03c27074512ea24467a3d37
2018-11-29 23:22:20 +00:00
Treehugger Robot
42f19a7987 Merge "Change srcjarDir/stubsDirs to a different name." 2018-11-29 22:22:15 +00:00