Commit graph

78 commits

Author SHA1 Message Date
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
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
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
Ivan Lozano
52767be335 Add support for Rust C libraries.
Adds the ability for rust modules to be compiled as C libraries, and
allows cc modules to depend on these rust-generated modules. This also
means that soong-rust should not have any dependencies on soong-cc aside
from what's required for testing.

There's a couple small fixes included as well:

 - A bug in libNameFromFilePath that caused issues when library's had
 "lib" in their name.
 - VariantName is removed from rust library MutatedProperties since this
 was unused.

Bug: 140726209
Test: Soong tests pass.
Test: Example cc_binary can include a rust shared library as a dep.
Test: m crosvm.experimental
Change-Id: Ia7deed1345d2423001089014cc65ce7934123da4
2019-10-28 22:09:01 -07:00
Ryan Prichard
ce6b216c5e Merge "Stop linking libdl.a into static bins" 2019-10-28 20:14:37 +00:00
Treehugger Robot
7d6b21c265 Merge "Soong generates libraries.txt files for vndk" 2019-10-26 01:52:39 +00:00
Ryan Prichard
b49fe1bde7 Stop linking libdl.a into static bins
libdl.a has a no-op dlopen, which breaks static libraries that need a real
dlopen. Instead of automatically linking libdl.a into static executables,
make it optional.

Until recently, the libunwind_llvm.a unwinder, used on arm32, needed the
no-op dladdr, but it's now built using -D_LIBUNWIND_USE_DLADDR=0.

The HWASan run-time uses dlsym and dladdr, so add a libdl dependency for
HWASan-built static binaries. We could also remove the dependency from
libclang_rt.hwasan_static-*.a, but this is also easy to do.

Bug: http://b/141485154
Test: bionic unit tests, device boots, verify that static and dynamic
   executables can throw/catch an exception
Test: verify that a static executable using dlopen doesn't link (unless it
   adds an explicit dependency on libdl)

Change-Id: Ic52c3f336b671b4ed335e99c94a64dfe8614b618
2019-10-24 22:25:54 -07:00
Jooyung Han
097087be53 Soong generates libraries.txt files for vndk
These files were generated by Make. This is an effort to converting make
to soong.

These files are created under a known location: $SOONG_OUT_DIR/vndk
- llndk.libraries.txt
- vndksp.libraries.txt
- vndkcore.libraries.txt
- vndkprivate.libraries.txt
- vndkcorevariant.libraries.txt
- vndk.libraries.txt: merged all of above with tags

The last one is used by 'check-vndk-list'.
(See the topic)

Others will be packaged by VNDK APEX of current VNDK.
(This is not merged yet. After landing, a follow-up CL will be
followed.)

Bug: 141019581
Bug: 141450808
Test: m check-vndk-list
Change-Id: I9a24f6975bd4b226a94f61a13d43857dcdce6b88
2019-10-25 14:08:28 +09:00
Jooyung Han
4c2b942e92 fix: Override vndk-ext lib name with original lib
vndk-ext should have the same output filename with the lib which it
extends. "extends" property is "module name", not "filename" of output.

Bug: 143130384
Test: add "protox" as a vndk-ext module (extends 'libprotobuf-cpp-full')
      m protox.vendor && check output filename under /vendor/lib/vndk/
      (should have correct suffix)

Change-Id: I5741ea87b4f2ad375b69f54c93dcb8753d9952dd
2019-10-22 20:01:28 +09:00
Colin Cross
e1bb5d092a Hide static from cc_library_shared and vice versa
The static properties don't make sense for cc_library_shared
modules, and the shared properties don't make sense for
cc_library_static modules.  Move them into separate property
structs so they can be added conditionally.

Test: m nothing
Test: DefaultsTest
Change-Id: I0b0cedf9eba07deb721fae138ffa7bedcfbfe71e
2019-09-24 15:05:57 -07:00
Inseob Kim
64c4395386 Add version to vendor variants
Vendor variant is now divided into several vendor.{version} variants,
depending on their intended usages:

vendor.{BOARD_VNDK_VERSION}: vendor and vendor_available modules
vendor.{PLATFORM_VNDK_VERSION}: VNDK modules in the source tree
vendor.{snapshot_ver}: VNDK snapshot modules

This also affects exported module names from Soong to Make. But to
maintain backward compatibility, ".{BOARD_VNDK_VERSION}" suffix will not
be emitted for modules having version BOARD_VNDK_VERSION, so that vendor
modules still can be referred as-is.

Bug: 65377115
Bug: 68123344
Test: clean build and boot blueline
Change-Id: Ib9016a0f1fe06b97e9423fd95142653a89a343fa
2019-09-18 10:53:30 +09:00
Jooyung Han
d48f3c3885 soong: Add tests for depending on disabled module
This will check if direct deps of android.Module type is "Enabled()".
Previously, this is checked only if a module calls VisitDeps*()
functions in GenerateAndroidBuildActions().

Most modules call VisitDeps*() in GenerateAndroidBuildActions(),
but some modules don't. For example, "apex" module calls
WalkDepsBlueprint() or VisitDirectDepsBlueprint() since it
exceptionally depends on non-android.Module modules.

Therefore, when an apex module depends on disabled(enabled:false) module,
build fails with panic, which is fixed by this change.

Test: m # runs soong tests
Change-Id: I81c5c148bbd51a253d2904690eb76ae7b6df1a0f
2019-08-26 13:19:42 +00:00
Treehugger Robot
792942de47 Merge changes I75b4a761,I779f28c6,If1422372,I26307dd1
* changes:
  Introduce inject_bssl_hash library property.
  BoringSSL FIPS build - introduce extraLibFlags and use for STL libs.
  Allow linker scripts when building objects.
  Allow .o files as srcs.
2019-08-23 00:15:08 +00:00
Pete Bentley
fcf55bf656 Allow .o files as srcs.
Test: m nothing
Test: TreeHugger
Bug: 134581881
Bug: 137267623

Change-Id: I26307dd1129e58878f0468da3b61c53f074bd674
2019-08-22 13:21:37 -07:00
Dan Albert
2da19cbc20 Link libc++demangle with libc++ for the device.
libc++demangle provides __cxa_demangle, which used to be a part of
libc++.so but is being moved out to save on resources since very few
libraries need it.

Test: make checkbuild
Bug: http://b/138245375
Change-Id: Ie97225d496d7d40f8749522bf36702a2d9dcdfe7
2019-07-24 12:17:40 -07:00
Jiyong Park
2907459e43 filegroup.path is used to specify the include path for aidl files
filegroup {
    name: "foo",
    srcs: ["srcs/aidl/com/android/**/*.aidl"],
    path: "srcs/aidl",
}

cc_library { // or java_library, etc.
    name: "bar",
    srcs: [":foo"],
}

automatically adds "-Ipath/to/foo/srcs/aidl" when compiling the aidl
files from foo for bar. This allows us to omit aidl include path
when using sources in other places via file group.

Bug: 135922046
Test: m (unit tests added)
Change-Id: I9b42f316f2858fb6da72c2f58a314f391416e809
2019-07-19 11:31:31 +09:00
Mitch Phillips
da9a463794 Add the cc_fuzz target.
Adds the cc_fuzz target via a cc_fuzz module. Also implements the
libclang runtime interface for the x86 toolchain to allow host-built
fuzzers.

Bug: 133261679
Bug: 137398545

Test: Build a fuzzer (with all topic patches), notice that you now
have a host-built fuzzer :)

Change-Id: I7fa069603415f40b3f12a002c253fca6e2aa1988
2019-07-16 16:30:53 -07:00
Yi Kong
e7fe9913d6 Clean up no_libgcc
no_libgcc is no longer needed anywhere. Move all occurances to no_libcrt
and remove no_libgcc.

Test: build
Change-Id: I6dd49db71d05d7685aa90cc837627f65e6742d6d
2019-06-03 15:52:40 -07:00
Jooyung Han
380029182c soong: fix wrong link type for VNDKs
Do not rely on 'module.Name()' to decide VNDK link type.
Some prebuilt modules such as libclang_rt_prebuilt_library_shared and
vndk_prebuilt may have different naming schemes.(prefix/suffix)
And llndk_library module has '.llndk' suffix.

Instead, use VNDK-related properties (e.g. vndk.enabled,
vendor_available, etc.).

Bug: 132800095
Test: m & check LOCAL_SOONG_LINK_TYPE for prebuilts
Change-Id: I06b0c182aeab16969c44a86397f02be4beb80bbd
2019-05-23 12:24:51 +09:00
Colin Cross
9a94287fc9 Move CreateTestContext to cc/testing.go
Allow CreateTestContext to be called by tests in other packages
that need cc modules.

Test: all soong tests
Change-Id: I6be04dec50632baa8cb51e55ba14d0ddc0df60b8
2019-05-17 08:43:36 -07:00
Colin Cross
33b2fb7333 Support using cc_prebuilt_library_shared with cc_library
Allow a cc_prebuilt_library_shared to share the same name as a
cc_library by always creating static and shared variants of
prebuilts so that the variants of the source module are always
a superset of the variants of the target module.

Bug: 131709055
Test: TestPrebuilts
Change-Id: I4afd6d37e6a986d08ad25aee69eca6d994febc6b
2019-05-17 08:40:42 -07:00
Inseob Kim
1f086e2f0d Generate VNDK snapshot with Soong except configs
This is the first commit to generate VNDK snapshot with Soong: .so
files, some txt files, and notice files are captured with Soong. As
ld.config.txt is currently in Android.mk and will be deprecated soon,
configs files (and zipping all of artifacts) are still handled with
Makefile.

Bug: 131564934
Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh
Test: 2) try installing vndk snapshot with:
     development/vndk/snapshot/update.py

Change-Id: I8629e1e25bfc461fd495565bb4872c9af176cf92
2019-05-15 10:26:54 +09:00
Yi Kong
acee27cd72 Strip libgcc to only keep fallback symbols
We use libgcc as fallback for symbols not present in libclang_rt
builtins, however we didn't know what exact symbols were being used,
some may not be intended to fallback.

Create libgcc_stripped, which only contains unwind symbols from libgcc.

Bug: 29275768
Test: bionic-unit-tests
Change-Id: I5b349fa6138e51663bf3b67109b880b4356da8e8
2019-04-30 10:07:00 -07:00
Colin Cross
fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Jooyung Han
a70f067899 Add checks for double_loadable dependencies
Vendor-available libs can be double-loaded if LLNDK libs depend
on them. Currently soong checks only 'direct' dependency bewteen
LLNDK and VNDK lib. With this change, soong checks if every dependencies
from LLNDK is also LLNDK or VNDK-SP or marked as 'double_loadable:true'.
This change causes many libs to be marked as 'double_loadable'.

Bug: 121280180
Test: m -j
Change-Id: Ibc1879b6fd465a3141520abe0150018c3051c0a7
2019-03-06 11:18:21 +09:00
Colin Cross
40e3373d41 Add more paths helper methods
Add PathsForOutput to convert multiple strings into WritablePaths.

Add OutputPath.InSameDir to build a new OutputPath pointing to a
file in the same directory as an existing OutputPath.

Add WritablePathForTesting and WritablePathsForTesting that mirror
PathForTesting and PathsForTesting but return WritablePaths.

Add PathContextForTesting to return a minimal PathContext
implementation.

Test: paths_test.go
Change-Id: I9708eb164b273514a96dae0a260ef9a963fb9bcf
2019-02-16 17:08:07 -08:00
Inseob Kim
c0907f191a Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.

As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.

Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
2019-02-13 23:32:51 +00:00
Jiyong Park
e4bb986106 Static variant of a stubs lib is correctly tracked
cc.Module.staticVariant is used to track the corresponding static
variant of a shared variant. This change fixes a problem that the
staticVariant field is not correctly set when the lib is with stubs:
{...}. This was happening because the staticVariant was set by adding
dependency from shared variant to static variant to reuse object files.
However, for a lib with stubs, the dependency was not created because it
does not make sense to share object files for stubs lib where source
code is auto-generated.

Fixing the issue by adding dependency to the static variant with a
different dependency tag whose only purpose is to set staticVariant
field.

Bug: 122885634
Test: m (cc_test amended)
Change-Id: I7f97cbb4c4a28bf9a93839d3b91ee140835aa6af
2019-02-08 00:47:46 +09:00
Doug Horn
c32c6b0d79 Support building for Fuchsia.
This CL adds configs for the arm64 and x64 fuchsia
device targets, sets up the necessary linker flags,
and disables some functionality that is not currently
supported on Fuchsia.

Bug: 119831161
Test: Compile walleye, internal validation against
fuchsia_arm64-eng and fuchsia_x86_64-eng.
Change-Id: I2881b99d2e3a1995e2d8c00a2d86ee101a972c94
2019-01-24 18:59:29 +00: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
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
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
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
Jaewoong Jung
16c7d3d263 Revert "Revert "Revert "Revert "Export static libraries.""""
This reverts commit 555c114283.

Reason for revert: The namespace issue in the pi-dev-plus-aosp-without-vendor branch is now fixed.

Change-Id: I26ed591447797a8ee505f43bdd209162418b6c5e
2018-11-16 01:20:05 +00:00
Jaewoong Jung
555c114283 Revert "Revert "Revert "Export static libraries."""
This reverts commit eb05c2a633.

Reason for revert: Yet another broken build.

Change-Id: I4198f2dd5c7848365d71d03f6dbd598998fb9bd8
2018-11-09 22:25:37 +00:00
Jaewoong Jung
eb05c2a633 Revert "Revert "Export static libraries.""
This reverts commit 3affc07ca0.

Reason for revert: The notice dependency bug is now fixed.

Change-Id: I5424ade9d742fbe190651097c04914a29db6dfa0
2018-11-09 16:02:34 +00:00
Martin Stjernholm
ef449fe62e Add shared_libs to vendor and recovery targets.
Prerequisite for https://android-review.googlesource.com/815573.

Test: Built system/core/libunwindstack with https://android-review.googlesource.com/815573
Bug: 118374951
Change-Id: I6dd7ba1416f34291792c8ac5cf74048753f3e2f6
2018-11-07 11:00:59 +00:00
Jaewoong Jung
3affc07ca0 Revert "Export static libraries."
This reverts commit 9d5ca159dc.

Reason for revert: This broke few builds.

Change-Id: Id9c4d7c145602a55ae07bb177f2c236e16f4fb63
2018-11-06 18:00:39 +00:00
Jaewoong Jung
9d5ca159dc Export static libraries.
Export static libraries through LOCAL_STATIC_LIBRARIES and
LOCAL_WHOLE_STATIC_LIBRARIES. This enables dependency-based NOTICE file
generation. Also, add a notice property in the libwinpthread module.

Bug: 36073965
Test: cc_test.go
Change-Id: If1ca1f9159e80cf8fbe71df7a13ca5d6a1f63b40
2018-11-05 23:48:10 +00:00
Jiyong Park
da732bd63a Set __<libname>_API__ macro when building against stubs
When building against libFoo#ver, __LIBFOO_API__ macro is set to ver so
that headers from libFoo can be conditionally compiled (e.g., hide APIs
that are not available for the version, etc.)

Bug: 112672359
Test: m (cc_test added)
Change-Id: I863ef95b385cdd842eec1bf34e81f44b5e3b58b3
2018-11-04 13:38:24 +09:00
Jaewoong Jung
3e6b1fbcfb Revert "Export static libraries."
This reverts commit 5d19e1de88.

Reason for revert: Broke aosp-build-tools/darwin_mac

Change-Id: I1af36848fb5a00849aec69941ddef33769b1b536
2018-11-02 22:56:30 +00:00
Jaewoong Jung
5d19e1de88 Export static libraries.
Export static libraries through LOCAL_STATIC_LIBRARIES and
LOCAL_WHOLE_STATIC_LIBRARIES. This enables dependency-based NOTICE file
generation. Also, add a notice property in the libwinpthread module.

Bug: 36073965
Test: cc_test.go
Change-Id: Ic63ca523b40acac82bbe876f7aa40ecd495907c5
2018-11-01 22:45:59 +00:00
Jiyong Park
7ed9de3b81 Add support for versioned stubs.
A cc_library or cc_library_shared can be configured to have stubs
variants of the lib.

cc_library_shared {
    name: "libfoo",
    srcs: ["foo.cpp"],
    stubs: {
        symbol_file: "foo.map.txt",
        versions: ["1", "2", "3"],
    },
}

then, stubs variants of libfoo for version 1, 2, and 3 are created
from foo.map.txt. Each version has the symbols from the map file where
each symbol is annotated with the version that the symbol was introduced
via the 'introduced=<ver>' syntax. The versions don't need to be in sync
with the platform versions (e.g., P for 28). The versions are local to
the library.

For another library or executable to use the versioned stubs lib, use
the new 'name#ver' syntax to specify the version:

cc_binary {
    name: "test",
    ....
    shared_libs: ["libFoo#2"],
}

Internally, a new mutator 'version' is applied to all cc.Module objects.
By default, a variant named 'impl' is created for the non-stub version.
If the versions property is set, additional variations are created per a
version with the mutable property BuildStubs set as true, which lets the
compiler and the linker to build a stubs lib from the symbol file
instead from the source files.

This feature will be used to enforce stable interfaces among APEXs. When
a lib foo in an APEX is depending on a lib bar in another APEX, then bar
should have stable interface (in C lang) and foo should be depending on
one of the stubs libs of bar. Only libraries in the same APEX as foo can
link against non-stub version of it.

Bug: 112672359
Test: m (cc_test added)

Change-Id: I2488be0b9d7b7b8d7761234dc1c9c0e3add8601c
2018-10-30 09:55:48 +09:00
Yi Kong
7df0f30785 Revert "Revert "Move libgcc to libcrt.builtins""
This reverts commit 6fb831bd56.

Bug: 29275768
Test: checkbuild and bionic native tests on arm/arm64/x86/x86_64
Change-Id: I774dea64a209dac673f927115b30170e5470db76
Merged-In: I774dea64a209dac673f927115b30170e5470db76
(cherry picked from commit 85e9ba15b5)
2018-10-09 20:39:50 +00:00
Colin Cross
e40b4eaeb0 Export cc module types and mutators needed for JNI testing
JNI testing will need to create basic native shared library
modules, export the minimum mutators and module types for
the required dependencies of a native shared library.

Bug: 80095087
Test: cc_test.go
Change-Id: Ibe7bc88b69cb0851291cb09a4c0c6cdb421b8651
2018-10-08 15:20:56 -07:00
Dan Willemsen
feea4dff66 Stop using GCC in toolchain_library
Instead, hardcode the ~dozen paths into build/soong/Android.bp, which
will unblock removing more GCC support.

Bug: 114286031
Test: m
Change-Id: I2508432e00b1469141f01e667f3c6a2fe30cd805
2018-10-07 23:50:34 -07:00
Yi Kong
6fb831bd56 Revert "Move libgcc to libcrt.builtins"
This reverts commit 77e62dbf59.

Reason for revert: caused boot failure on mirror-aosp-master-with-vendor

Change-Id: I594df35878616dba8990d044d7cd529458a601b6
2018-10-05 22:10:04 +00:00
Yi Kong
77e62dbf59 Move libgcc to libcrt.builtins
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.

libc and libm are excluded from the switch due to some symbols being
hidden in libcrt.builtins but not in libgcc. These will be addressed in
a separate CL.

Bug: 29275768
Test: checkbuild and bionic native tests on arm/arm64/x86/x86_64
Change-Id: Icc85bf88513e989a4b1547564405a22cf847db8a
2018-10-04 03:03:19 +00:00
Jiyong Park
5baac54d58 link type of recovery variant of a vendor module should not be native:vendor
This CL fixes a bug that when a module is configured as 'vendor: true' &&
'recovery_available: true', the link type of the recovery variant of the
module is incorrectly set to 'native:vendor'. This was because,
androidmk.go emits 'LOCAL_PROPRIETARY_MODULE := true' whenever
Proprietary property is set to true, regardless of whether it is a
recovery variant or not. This in turn makes LOCAL_USE_VNDK := true for
the module which in turn causes the link type to be 'native:vendor'.

Fixing the bug by resetting the properties like Proprietary, Vendor,
Soc_specific, etc. for the recovery variants.

Bug: 113277544
Test: m -j (test added)
Change-Id: I5d6ae76e46ef8fcd9204d386d0809862a7b0ff7e
2018-08-28 10:03:17 +09:00