Commit graph

1917 commits

Author SHA1 Message Date
Jiyong Park
1c29b0e6ec Fix: sanitizerRuntimeMutator is not run for host
Bug: 123254047
Test: m ASAN_OPTIONS=detect_leaks=0 SANITIZE_HOST=address
FORCE_BUILD_LLVM_COMPONENTS=true out/host/linux-x86/bin/adb
nm -an out/host/linux-x86/bin/adb  | grep -c asan
shows non-zero value

Change-Id: I030e08bd0db38585b1fdaecd00220406f1e8b371
2019-01-23 23:37:45 +09:00
Logan Chien
c7f797ea54 Fix shared_libs for cc/prebuilt.go
This commit fixes `shared_libs` for `cc_prebuilt_binary`,
`cc_prebuilt_library_static`, and `cc_prebuilt_library_shared`.  Before
this commit, all shared libraries in `shared_libs` are dropped from the
generated `LOCAL_SHARED_LIBRARIES`.  This commit fixes the problem by
delegating `linkerDeps()` to `libraryDecorator.linkerDeps()`.

This commit also fixes the dependencies to NDK shared libraries.  Before
this change, those dependencies are mapped to a `ndkStubDepTag` and then
ignored by the computation of `AndroidMkSharedLibs`.  This commit adds
it back.

Bug: 123053270
Bug: 119084334
Test: libclang_rt.scudo-*.so can be checked with 2 more hacks.
Change-Id: I59e37e1a3fe0c329e8cb7032e5671f117f7832a0
2019-01-23 07:21:56 +00:00
Logan Chien
4fcea3d9a3 Add prebuilt ABI checker support to soong
This commit adds prebuilt ABI checker support to soong so that
`cc_prebuilt_library_shared` and `cc_prebuilt_binary` are checked.

To opt out the check, add `check_elf_files: false` to your module.

Bug: 119086738
Test: lunch aosp_sailfish-userdebug && CHECK_ELF_FILES=true make check-elf-files
Change-Id: Idb4290c8f48aad545894a7ae718a537cbf832233
2019-01-23 10:15:02 +08:00
Logan Chien
5c7c78a2e0 Merge "Add sdk version workaround for libclang_rt" 2019-01-22 01:04:35 +00:00
Jerome Gaillard
7f7f34f81a Add Skia deps to the list of available Windows libraries
Building Skia for Windows requires linking some Windows libraries that
were not in the list of available ones. This adds the necessary
libraries.

Test: N/A
Change-Id: I803b7b05f47163316c6f03866145dc50656a6bef
2019-01-21 11:34:46 +00:00
Logan Chien
834b9a6216 Add sdk version workaround for libclang_rt
libclang_rt.*.so depends on libc++, which is not a part of NDK.  Thus,
this workaround must be added in order not to break the build when the
prebuilt dependencies are checked.

Bug: 121358700
Test: make checkbuild
Change-Id: Icaeb7adf96fb72829053e198b659ebcb19a035fc
2019-01-21 10:29:47 +08:00
Logan Chien
6cf8ff918a Merge "Add apex stub lib to LOCAL_SHARED_LIBRARIES" 2019-01-19 03:48:30 +00:00
Logan Chien
6af24f9677 Merge "Always respect system_shared_libs from Android.bp" 2019-01-19 02:34:34 +00:00
Logan Chien
09106e182e Add apex stub lib to LOCAL_SHARED_LIBRARIES
This commit removes a break statement so that apex stub libraries are
added to LOCAL_SHARED_LIBRARIES for prebuilt ABI checker.

This CL doesn't change I09b78e38df285033ef6e9c85f7ea4b0274e85070 [1].
The libraries provided by apex modules are not installed to
`/system/lib[64]` because their stub libraries have
`LOCAL_UNINSTALLABLE_MODULE := true`.

[1] https://android-review.googlesource.com/844555

Bug: 120266448
Bug: 119084334
Test: Add `stubs: { symbol_file: "libnetd_resolv.map.txt", versions: ["1"]}`
      to libnetd_resolv, create a program that depends on
      `libnetd_resolve`, build the program, and do not find
      `/system/lib/libnetd_resolv.so`.
Change-Id: Iffa2c1a0eac9c4940ec1fa05fbacb9806272c31e
2019-01-19 07:45:31 +08:00
Jaewoong Jung
d4a393466a Merge "Move arch variants registering code to arch.go." 2019-01-17 15:26:23 +00:00
Logan Chien
14bd0db2f7 Always respect system_shared_libs from Android.bp
This commit removes a special case that ignores `system_shared_libs`
when `sdk_version`, `vendor_available`, or `vendor` is specified.

In the past, that special case was required for `libasync_safe` and
`libpropertyinfoparser`.  However, ignoring `system_shared_libs` meant
that we didn't have a way to skip the default libs when `sdk_version`
was specified.  This becomes a problem when the dependencies of
prebuilts are actually checked.  To be specific,
`libclang_rt.builtins-${arch}` falls into circular dependencies.

Bug: 123006819
Test: make checkbuild
Change-Id: I5fe038c00892b3abe5189b30d57ba59884b47cbb
2019-01-17 21:16:48 +08:00
Logan Chien
f6dbd9c5f7 Do not check the ABI stability of LL-NDK-Private
This commit skips the ABI checks on LL-NDK-Private because
LL-NDK-Private libs are only used by other VNDK-core or VNDK-SP libs on
the system partition, are NOT used by vendor modules, and do not
constitute a system-vendor interface.

Bug: 122938657
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: Ia2af4250ef1443f8ea3ed5ab111668462f120979
2019-01-17 11:54:53 +00:00
Jaewoong Jung
e46114c11b Move arch variants registering code to arch.go.
This enables using arch-dependent property values in modules defined in
android/.

Bug: 122332178
Test: Soong tests + TreeHugger
Change-Id: I89869e395fabf0e69f505b77eab8a4221384124e
2019-01-16 18:29:03 -08:00
Nicolas Geoffray
c22c1bf130 Return false in DirectlyInAnyApex for host libraries.
Host doesn't have apexes.

Bug: 122947954
Test: build dex2oat, check that libnativebridge is installed.
Change-Id: I3548e3f155a200e56d71e88631b71511bad84161
2019-01-16 23:37:07 +00:00
Treehugger Robot
cdfaaf4d75 Merge "Add Symbol_ordering_file property" 2019-01-16 17:52:48 +00:00
Treehugger Robot
a09e13a4ab Merge "APEXes can be sanitized" 2019-01-15 02:13:32 +00:00
Dan Willemsen
01a3c25ed7 Configure the default arch variant features per-OS
The minimum set of supported features are different between Android and
Linux with X86_64. So while the list of variants and features are still
technically correct, and may be shared more in the future, the default
needs to be configured differently.

Bug: 120208462
Test: add `host_supported: true` to libopus; m libopus
Change-Id: Ib79707d17b852f77341026085230c026b6386b78
2019-01-15 00:53:28 +00:00
Stephen Hines
db89aa2c1d Merge "Switch to clang-r346389c." 2019-01-14 21:47:17 +00:00
Vic Yang
b70617a160 Add Symbol_ordering_file property
We add an optional Symbol_ordering_file property to linker properties
to allow modules to specify the order of symbols in the binary.

Bug: 112073665
Test: Build libc with a symbol ordering file and check the resulting
      binary.

Change-Id: Ibb24697cfdee4a5750442cb74f1ee6390d8a6430
2019-01-14 11:00:10 -08:00
Yi Kong
98975c301e Merge "Move -Wno-null-dereference to external only" 2019-01-14 01:38:38 +00:00
Jiyong Park
c1e7f48b4c Stubs libs are built with version script
Stubs libs are built with the generated version script file.

Bug: 120266448 (comment #23)
Test: lunch walleye_hwasan-userdebug
make SANITIZE_TARGET=hwaddress oatdump

Change-Id: I38652e61d0b336227b7f541590b0e70fe291f0a3
2019-01-13 03:11:27 +09:00
Jiyong Park
379de2fab0 APEXes can be sanitized
This change first introduces the interface "Sanitizeable" that
module types other than cc.Module can use to be handled by the sanitizer
mutator. APEX module, by implementing the interface, gets sanitizer
variants.

In doing so, sanitizer.go is refactored so that modules have explicit
dependencies to the runtime sanitizer libraries. This allows the runtime
library to be packaged into the APEX when required. This also completes
the dependency graph; updating the prebuilt sanitizer runtime will
trigger rebuilding of modules using the runtime.

Bug: 120894259
Bug: 121038155
Test: SANITIZE_TARGET=hwaddress m apex.test
Test: TARGET_FLATTEN_APEX=true SANITIZE_TARGET=address m
Change-Id: Ia91576ff48cda3c996350308b75bf83fcf7c23d7
2019-01-13 00:48:47 +09:00
Michael Butler
eaebd76656 Revert "Symbols for libs in APEXes are available"
This reverts commit 769e50b3c9.

Reason for revert: Likely causing build failure on aosp_x86_64-eng in aosp_master:

"build/make/core/base_rules.mk:271: error: art/build/apex: MODULE.TARGET.SHARED_LIBRARIES.com.android.runtime.host.libart-compiler already defined by art/build/apex."

Change-Id: I83b7caa04b2648e4e4914aae2fa5878516634eed
2019-01-11 20:23:36 +00:00
Stephen Hines
c0042a2c77 Switch to clang-r346389c.
This cherry-pick update picks up a few patches to improve hwasan, ELF
tls, and LLD for kernel builds.

Bug: http://b/122549771
Test: make checkbuild, boot
Change-Id: I8a90282af41ad4c74df819484ba2c3507e20100f
2019-01-11 09:21:46 -08:00
Jiyong Park
769e50b3c9 Symbols for libs in APEXes are available
The unstripped file for libraries in APEXes are available via
out/target/product/<device>/symbols/apex/<apex_name>/path_to_lib.

This change make the symbol files available by installing the individual
files in APEXes to the directory where the APEXes will be mounted at
(i.e. runtime directory which is /apex/<apex_name>). Note that the files
are not actually packaged to a filesystem image; they are installed just
to create the symbol files under the out directory where developers can
use them for debugging.

Bug: 120846816
Test: m com.android.runtime.debug
There are unstripped files under
out/target/product/walleye/symbols/apex/com.android.runtime.debug

Change-Id: Ib182e2bf8787b7669ccba13814491db35370f468
2019-01-11 23:45:20 +09:00
Jiyong Park
b07885714c Rename non-stubs variant of a lib if it is included in APEX
If a lib is directly included in an APEX (via native_shared_libs
property) and the lib has stubs (via stubs.versions property), then the
ordinary non-stubs variant of the library is renamed to
<libname>.bootstrap in the makefile. At the same time, the stubs variant
of the lib becomes visible and it's name is <libname>.

This ensures that modules in Android.mk build against the stubs
variant thus preventing them from using private APIs in the lib.

The non-stubs variant, however, is used if the module explicitly has
set the new 'bootstrap' property to true. This is useful for building
some early binaries (such as init and vold) which need to run before
APEXes are activated. Since they can't use the bionic libs from the
runtime APEX, they should use the bionic libs left in the system
partition which is called the boostrap bionic.

Bug: 120266448
Test: m
Test: m with https://android-review.googlesource.com/c/platform/bionic/+/849044

Change-Id: I882b8aeb5b29460f07b4424e4f8eb844d6c9a9b0
2019-01-10 09:57:29 +09:00
Treehugger Robot
9b84d34be3 Merge "Don't expect depfile from .s files" 2019-01-04 15:19:33 +00:00
Dan Willemsen
fcabb1c518 Don't expect depfile from .s files
.s files (unlike .S files) aren't run through the preprocessor, so -M*
doesn't actually write out a depfile.

Since our ninja is now going to be verifying that the depfile is created
(https://android-review.googlesource.com/861510), don't specify a
depfile for .s files.

Bug: 121058584
Test: apply https://android-review.googlesource.com/861510
Test: cd external/libavc; mma
Change-Id: I1697aa020c63639317c8f4771147026601ae72fc
2019-01-03 23:25:11 -08:00
Logan Chien
fa478c0234 Do not build lsdump for APEX variants
This commit stops building lsdump files for APEX variants since APEX
variants are local to APEX modules themselves.

Bug: 121986692
Test: make findlsdumps  # compare $ANDROID_PRODUCT_OUT/lsdump_paths.txt
Change-Id: I37fcd152d0d84d235a354ea53e53e808dd71464a
2019-01-04 13:28:06 +08:00
Jiyong Park
67883b3ec6 Fix: stubs lib is installed in APEX
This CL fixes the problem that when a lib is defined with stubs, the
stubs variantof the lib is installed to the APEX. This was happening
because the non-stubs variant is the last variant of the 'version'
variants and addFarVariationDependencies selects the first variant when
the 'version' variant isn't specified.

Fixing the problem by making the non-stubs variant (whose name is "")
the first variant.

Test: m (apex_test)

Change-Id: I1505fd2f29a0d70c916bad51000aa06f2b80b137
2019-01-04 03:37:00 +09:00
Jiyong Park
f7df9b7e55 Fix: 'required' property is ignored
This change fixes a bug that the 'required' property of a module is
ignored when the module is using a shared from an APEX. This is
happening because LOCAL_REQUIRED_MODULES is overwritten (with := instead
of +=) when ApexesProvidingSharedLibs is not empty.

Fixing the bug by appending ApexesProvidingSharedLibs to
AndroidMkData.Reuired so that it is handled in android/androidmk.go

Test: m
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
and make sure that system/bin/vold_prepare_subdirs exist.

Change-Id: Ie57bca480ba4198b4da0df1c73e92fa42b5ebda8
2019-01-04 01:19:44 +09:00
Dan Willemsen
d56097dc27 Remove incorrect file comments
Test: none
Change-Id: Ia2889ee29c2c0bf18adf5d90e506cfce4b14fdcc
2018-12-27 12:26:30 -08:00
Yi Kong
fae5dac8fd Move -Wno-null-dereference to external only
Test: m checkbuild
Bug: 29823425
Change-Id: Icd675e451b2a2a8e3f489706e533f92d991de9c0
2018-12-21 14:51:41 -08:00
Jiyong Park
16e91a067d Fix: static dependency across an APEX is lost
This change fixes following problem:

1) a native lib having stubs is defined.
2) the lib is included in an APEX.
3) a static binary is linking the lib from outside of the APEX.
4) then, the dependency from the binary to the lib is vanishing.

This is happening because cc.depsToPaths() mistakely does not
distinguish static lib deps from shared lib deps. For shared lib deps,
it creates two dependencies (one for stubs variant and the other for
non-stubs variant) and choose the stubs variant when the lib and the
current module is not in the same APEX (i.e. dependency to the non-stubs
variant is discarded). However, since we don't have stubs variant for
static library, it ends up having no dependency to the library if the
link is static.

Fixing the issue by skipping the variant selection routine when the link
is static.

Test: m (apex_test added)
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
Change-Id: I21102a31cc5c0b105da2affdd035bd5cc571a6ab
2018-12-21 18:01:39 +09:00
Jiyong Park
da6eb592bf Add use_vendor to APEX module
use_vendor, when set to true, brings vendor variant of the native
libraries and binaries to the APEX.

Bug: 115707625
Test: m (apex_test updated)
Change-Id: Ib4e996f8652f4ce4645a9c22f6914e2ab35edda6
2018-12-20 14:33:02 +09:00
Jaewoong Jung
3a0989ce4c Merge "Ignore shared libs for static executables." 2018-12-19 16:16:24 +00:00
Sundong Ahn
5b73f31c80 Add dependency for sysprop
The dependency is added because the module that uses the sysprop library
needs generated code before it is built.

Test: m -j
Change-Id: I2858fc6fa6f2fe16afa2f4a7ae62746ba0f67e5c
2018-12-19 07:23:08 +00:00
Treehugger Robot
8cc51b5620 Merge changes Idb2b552b,I190bca35
* changes:
  When a stub is built for APEX, it is generated with --apex
  APEX-specific symbols can be tagged as # apex
2018-12-19 06:28:23 +00:00
Evgenii Stepanov
3c5a52a477 [hwasan] Reduce history size to save memory.
Bug: 112437883
Test: adb shell echo $HWASAN_OPTIONS
Change-Id: Ifc4ab10e37efb1a0ce7ea77ad691947d24c2da2b
2018-12-18 17:02:44 -08:00
Jaewoong Jung
232c07c217 Ignore shared libs for static executables.
Ie42edc5184f315f998db953594e425214b810e0e added system_shared_libs to
static libraries so that their exported headers can be referenced.
However, it also added unrequired dependencies, which is an
error-triggering issue for static executables.

This change addresses it by adding a condition to shared libs handling code
in binary.go.

Bug: 121152570
Test: cc_test.go, library_test.go
Change-Id: I1828442c4e496f8d815fccaeca970cd5766bdf5d
2018-12-18 15:56:59 -08:00
Jiyong Park
3fd0baf651 When a stub is built for APEX, it is generated with --apex
Now, symbols that are only to be visible to across APEXes can be tagged
as # vndk. Then when generating the stubs library, the tagged symbol
is included. The symbol is NOT included in other cases; build NDK stubs,
etc.

Bug: 120638081
Test: m (apex_test updated.)
Change-Id: Idb2b552badddfc26af113cc8d4b984788f478813
2018-12-16 02:13:14 +09:00
Jiyong Park
bb4e13536e APEX-specific symbols can be tagged as # apex
If a symbol is tagged as # apex, then it is exported when gen_stub_libs
is invoked with --apex.

Bug: 120638081
Test: python3 cc/test_gen_stub_libs.py

Change-Id: I190bca35d1a4fb422b37d1be41a34de1ad64de6b
2018-12-16 02:12:13 +09: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
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
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
Ivan Lozano
e98d11f733 Merge "Add option to avoid recovering with diagnostics." 2018-12-13 20:56:18 +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
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
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
Chih-hung Hsieh
d340852732 Merge "Disable cert-dcl16-c clang-tidy check for mingw32." 2018-12-11 17:41:38 +00: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
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
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
Yi Kong
d218df1b2f Remove unneeded -Wno-dangling-field flag
Test: m checkbuild
Change-Id: I4867fb80ffa901d4fef96b315cd114e6f9b82476
2018-12-06 16:43:55 -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
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
Treehugger Robot
a7a432fb82 Merge "Remove unneeded -Wno-constant-logical-operand flag" 2018-12-06 03:36:11 +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
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
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
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
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
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
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
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
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
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
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
Nikita Iashchenko
a9e5a40bb8 Merge "Revert "C++17: switch the default."" 2018-11-30 14:27:16 +00:00