Commit graph

8 commits

Author SHA1 Message Date
Colin Cross
5271fea26c Remove global state from vendor public libraries
Remove the global list of vendor public library modules used to rewrite
dependencies from the vendor module to the stubs for system modules,
and replace it with building the stubs directly in the system variant
of the vendor module.

Bug: 178231622
Test: vendor_public_library_test.go
Change-Id: I826e69ffd507d7e85fa3d4d85b5157428c642143
2021-04-27 16:26:00 -07:00
Colin Cross
b719c0194e Fix and test vendor public libraries for product modules
Vendor public libraries are checked for product modules, but never
reached because the VNDK check occurs first, and wouldn't work anyways
because vendor_public_library did not have the product_available
property.  Reorder the rewrite checks and add VendorProperties, and
add a test.

Bug: 178231622
Test: vendor_public_library_test.go
Change-Id: Idbd2802fbd134d22c30600762cb0465633703506
2021-04-26 18:23:45 -07:00
Thiébaud Weksteen
d458745f15 cc: export Stripper struct
The cc stripping logic can be reused for Rust. Export the Stripper
structure for that purpose. Extract the strip-related flags from
builderFlags into StripFlags. Add the method flagsToStripFlags
(similarly to flagsToBuilderFlags).

Add the helper method disableStripping on libraryDecorator.

Test: m
Bug: 153430439
Change-Id: I11aef1abb8d498a4c1672500a7398279edf7f548
2020-08-27 10:13:42 +02: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
Dan Willemsen
939408aa22 Add dependency to version script when linking stub libraries
This isn't an effective issue with local builds currently, since the
version script is generated from the same rule as the sources used to
compile the objects that are also used in the link command. But if we
ever separated those paths or adopted restat, we could miss this
dependency.

This is also required for my RBE build to actually expose this file to
the link step.

Test: treehugger
Change-Id: I32bbb18cf7edddc88759d4f445d081868f3e9b44
2019-06-10 18:02:25 -07:00
Inseob Kim
9516ee9556 Attach global variables to Context
Global variables make testing difficult, and they should attached to
Context.

Bug: N/A
Test: m
Change-Id: Ic671dda755e99d036c7ddce0eed114496374d7ec
2019-05-09 12:29:58 +09:00
Patrice Arruda
ea3fcdffc2 Soong: Add synopsis to several modules under the cc package.
Added synopsis to the following modules under cc package:
    * llndk_headers
    * llndk_library
    * vendor_public_library
    * toolchain_library

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I0f6e3b01b478d46afeacbe6fc8e05f96d6217c7d
2019-04-03 14:43:03 -07:00
Jiyong Park
374510bcb6 Allow platform modules to link to vendor public libraries
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.

However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).

This change provides a way to make a vendor lib as public by defining a
module of type 'vendor_public_library' with a map file that enumerates
public symbols that are publicized:

cc_library {
   name: "libvendor",
   proprietary: true,
   ...
}

vendor_public_library {
   name: "libvendor",
   symbol_file: "libvendor.map.txt",
}

This defines a stub library module named libvendor.vendorpublic from the
map file. `shared_libs: ["libvendor"]` is redirected to the stub library
when it is from the outside of the vendor partition.

Bug: 74275385
Test: m -j
Test: cc_test.go passes
Change-Id: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
2018-03-30 10:22:52 +09:00