Commit Graph

3295 Commits

Author SHA1 Message Date
Jaewoong Jung
0c1ae15caa Revert "Export static libraries." am: 3affc07ca0
am: ae268e6050

Change-Id: I6b6e056f287985545243d83acf34f1dfa00c17fd
2018-11-06 10:22:46 -08:00
Jaewoong Jung
ae268e6050 Revert "Export static libraries."
am: 3affc07ca0

Change-Id: Iece4468654c0a789f2b86408b1c6ef8d3cfedcea
2018-11-06 10:18:51 -08: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
9bbb43bfcb Export static libraries. am: 9d5ca159dc am: 212c82513c
am: b835e54415

Change-Id: Icc11828aa6b977cddca8480adab1d3e258725187
2018-11-06 07:37:31 -08:00
Jaewoong Jung
b835e54415 Export static libraries. am: 9d5ca159dc
am: 212c82513c

Change-Id: I383cad7f8405473e23732ccd361cfe49e40aff1d
2018-11-06 07:29:20 -08:00
Jaewoong Jung
212c82513c Export static libraries.
am: 9d5ca159dc

Change-Id: I1a4ec768e82a53fc609552339789671ec90164d6
2018-11-06 07:20:46 -08: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
e9da3e3313 Merge "Set __<libname>_API__ macro when building against stubs" am: 1a583e7eef am: a846bd5f97
am: e6a4ccb9f2

Change-Id: Ia1776c6a7a29b75d86b3505fc437f37582a1cd45
2018-11-04 09:14:20 -08:00
Jiyong Park
e6a4ccb9f2 Merge "Set __<libname>_API__ macro when building against stubs" am: 1a583e7eef
am: a846bd5f97

Change-Id: I5ffe134a36fda08ee2ccafc8744b98b60a11e7d4
2018-11-04 09:09:23 -08:00
Jiyong Park
a846bd5f97 Merge "Set __<libname>_API__ macro when building against stubs"
am: 1a583e7eef

Change-Id: I05d4d003af70ac7dffcadfe5d72c0b89c45f52ab
2018-11-04 09:04:27 -08: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
Dan Willemsen
8a6325ce6d Merge "Revert "Export static libraries."" am: 22d7486605 am: 2c0663f741
am: f59409fbef

Change-Id: I090a4f8b93e8b5e54a0b91c45ff1471b9d0c049f
2018-11-02 16:24:25 -07:00
Dan Willemsen
f59409fbef Merge "Revert "Export static libraries."" am: 22d7486605
am: 2c0663f741

Change-Id: I760a3596fdb7977930bf151e22174a711602ea6d
2018-11-02 16:20:24 -07:00
Dan Willemsen
2c0663f741 Merge "Revert "Export static libraries.""
am: 22d7486605

Change-Id: I96bd769857841c1ed4d384cab27a52b7c1999731
2018-11-02 16:16:13 -07: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
f682707ac7 Merge "Export static libraries." am: fef155c540 am: 458e7b1ab1
am: 46e6babcbd

Change-Id: I667c2cceebd009ff5ab18d329dfb75ecf8acf7bc
2018-11-02 15:40:37 -07:00
Jaewoong Jung
46e6babcbd Merge "Export static libraries." am: fef155c540
am: 458e7b1ab1

Change-Id: Ia530d3b2aaff6d654a0e284a1b9eb8a903a8dd9e
2018-11-02 15:36:25 -07:00
Jaewoong Jung
458e7b1ab1 Merge "Export static libraries."
am: fef155c540

Change-Id: Idd075a7c2424efc2568b70291b43ae7c9f74a3a7
2018-11-02 15:31:21 -07:00
Yi Kong
53ed59ef35 Update clang to r344140
Bug: 111759196
Test: Test various targets in AOSP and internal branches.
      For Googlers, go/clang-r344140-testing
Change-Id: I70fc5a2824de698d78c95ce2acd42eff9c5ebe15
2018-11-01 23:13:25 +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
Chih-hung Hsieh
c29e55d439 Merge "DO NOT MERGE, Make default -Wimplicit-fallthrough as error." 2018-11-01 17:51:41 +00:00
Alex Light
87b17fe905 Merge "Remove -fno-emulated-tls from linux_bionic" am: d6bb90dc0d am: 26559baeed
am: f3040a608e

Change-Id: If2d7db22e073d4f93da602a123c2bda98b3c0325
2018-11-01 09:30:42 -07:00
Alex Light
f3040a608e Merge "Remove -fno-emulated-tls from linux_bionic" am: d6bb90dc0d
am: 26559baeed

Change-Id: I6e8469b0134aa95da1eceff247422d5d16264119
2018-11-01 09:26:02 -07:00
Alex Light
26559baeed Merge "Remove -fno-emulated-tls from linux_bionic"
am: d6bb90dc0d

Change-Id: I601f6aef28d2391149e6dabd8afd93956ce3566b
2018-11-01 09:21:21 -07:00
Alex Light
d6bb90dc0d Merge "Remove -fno-emulated-tls from linux_bionic" 2018-11-01 16:15:35 +00:00
Chih-hung Hsieh
abe97945df Merge "Enable global -Wimplicit-fallthrough as default error." 2018-11-01 01:54:30 +00:00
Alex Light
a08ae8487c Remove -fno-emulated-tls from linux_bionic
This was preventing tools using 'thread_local' from compiling and is
not needed. Bionic fully implements TLS.

Test: cd tools/dexter/slicer; mma
Bug: 31559095
Change-Id: Ib362ad8bc950726080356b61ccae83f155ce040b
2018-10-31 11:18:22 -07:00
Chih-Hung Hsieh
53390f2557 DO NOT MERGE, Make default -Wimplicit-fallthrough as error.
Other branches might still have this warning for some build targets.

Bug: 112564944
Test: make checkbuild
Change-Id: I3db52b8a60bb28861fc9ba963a7d1cd1fe49e903
2018-10-31 18:04:22 +00:00
Chih-Hung Hsieh
d6022447f1 DO NOT MERGE, Make default -Wimplicit-fallthrough as error.
Other branches might still have this warning for some build targets.

Bug: 112564944
Test: make checkbuild
Change-Id: Ic2474aa4e09904c046714182bd90409def0e826d
2018-10-31 17:59:54 +00:00
Logan Chien
b2ffda5e4c Merge "Use prebuilt bionic versioner" am: 96ef45a3dd am: 12de07afa5
am: 5aec54ec67

Change-Id: I75f94aafb20e5c22260f9d4afd9c9ea48459f488
2018-10-30 19:05:21 -07:00
Logan Chien
96ef45a3dd Merge "Use prebuilt bionic versioner" 2018-10-31 01:30:54 +00:00
Chih-Hung Hsieh
a07a9e0ba4 Enable global -Wimplicit-fallthrough as default error.
Bug: 112564944
Test: make checkbuild
Change-Id: Ic2474aa4e09904c046714182bd90409def0e826d
2018-10-30 09:39:42 -07:00
Jiyong Park
99b6b0cd45 Merge "Add support for versioned stubs." am: 2ef8557c7f am: 8b8fb6aa32
am: a7003c1221

Change-Id: I5e96478e79f8607f4f939b965b4c6cd7c9e12ba5
2018-10-29 21:51:41 -07:00
Logan Chien
2f066354d4 Use prebuilt bionic versioner
This commit replaces versioner host binary (built just-in-time) with
a prebuilt binary under `prebuilts/clang-tools/${OS}/bin/versioner`.
This is a part of the effort to switch to clang-r339409b.

See also.
https://android-review.googlesource.com/c/platform/bionic/+/799321

Bug: 113263746
Test: make checkbuild
Change-Id: Ia845e1c01d8b8084d00bdc4af706e867e1599863
2018-10-30 10:11:45 +08: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
Peter Collingbourne
caf7f87a65 Merge "Enable safe ICF with LLD." am: 63c6361f91 am: e77fe6ac08
am: 6cfa0e453a

Change-Id: I0a67788593daef55c323c85b2e778561473c4458
2018-10-26 18:23:11 -07:00
Peter Collingbourne
63c6361f91 Merge "Enable safe ICF with LLD." 2018-10-27 00:59:55 +00:00
Rahul Chaudhry
cd389d1831 Merge "Enable SHT_RELR sections to encode relative relocations." am: 33195833de am: 54a2ea815b
am: 261ebad9f7

Change-Id: Idd8de5d0ea5f5e2f4e78636c2ca7740fc5ceb888
2018-10-25 14:27:14 -07:00
Treehugger Robot
33195833de Merge "Enable SHT_RELR sections to encode relative relocations." 2018-10-25 21:02:44 +00:00
Peter Collingbourne
486e42c353 Enable safe ICF with LLD.
Support for safe ICF was added to LLD in LLVM r337429. This reduces
the size of sailfish system.img by 7.6MB.

The address-significance tables created by Clang to support LLD's
implementation of safe ICF are incompatible with ld -r. Therefore we
need to pass -fno-addrsig to the compiler to prevent it from creating
an address-significance table when building a cc_object.

Change-Id: I83e28741e6b3cdf09566447d2658ce48594f2074
2018-10-25 13:40:28 -07:00
Bill Yang
2b5a30edda Merge "Revert "ATest: GTest auto gen config support run_test_as in Android.bp ."" am: 1e30905f65 am: 632b491143
am: 811f7d6570

Change-Id: I9844c731924afc4f2d6f4dd6aee237d62f43d705
2018-10-25 02:13:53 -07:00
Treehugger Robot
1e30905f65 Merge "Revert "ATest: GTest auto gen config support run_test_as in Android.bp ."" 2018-10-25 08:53:24 +00:00
Bill Yang
fd18c42b37 Revert "ATest: GTest auto gen config support run_test_as in Android.bp ."
This reverts commit d30b940dff.

Reason for revert: sed -i requires an argument on mac, break build on mac.

Change-Id: Iba2db061ae888d265e02b750e50959019cf0f168
2018-10-25 07:10:40 +00:00
Colin Cross
fba8db00bb Merge "Move Ndk_abis from soong.config to soong.variables" am: 05802ab51d am: abf1459900
am: 11231fcc94

Change-Id: Ib4d638373756c9144b8d73927caf3cf67d57cf9d
2018-10-24 22:23:19 -07:00
Treehugger Robot
05802ab51d Merge "Move Ndk_abis from soong.config to soong.variables" 2018-10-25 04:56:33 +00:00
Peter Collingbourne
dcaec6c6fd Prevent clang from using the x18 register on arm64. am: 98d8580c3a am: d90423e2a6
am: 29a8c9739d

Change-Id: Ie661bcf12e5c66631e5fb599d6c19ad64a8d207f
2018-10-24 20:33:40 -07:00
Peter Collingbourne
98d8580c3a Prevent clang from using the x18 register on arm64.
This is achieved via the compiler flag -ffixed-x18 for non-LTO builds
and the linker flag -plugin-opt -mattr=+reserve-x18 for LTO builds.

This change should be reverted once we upgrade past LLVM r340889
which does this by default on Android.

Bug: 112907825
Bug: 111759196
Change-Id: I05473ddbb98319d87d442425b4d715647eae3a38
2018-10-24 23:40:49 +00:00
Colin Cross
395f2cfa89 Move Ndk_abis from soong.config to soong.variables
soong.config is not cleared between builds, which can cause
problems when switching between an ndk build and a platform build.

Bug: 118398924
Test: OUT_DIR=out_ndk DIST_DIR=dist build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: Ifc03a0c25f46625375cdda5723e4a09d7d8050d5
2018-10-24 23:20:10 +00:00
yelinhsieh
463863ed7f Merge "ATest: GTest auto gen config support run_test_as in Android.bp ." am: f2ea4dddeb am: 92e19c6871
am: b8fab404de

Change-Id: I97be46856f9cf6e7b7b15324348e5a658916da50
2018-10-24 07:11:31 -07:00
Treehugger Robot
f2ea4dddeb Merge "ATest: GTest auto gen config support run_test_as in Android.bp ." 2018-10-24 13:53:50 +00:00