Commit Graph

35371 Commits

Author SHA1 Message Date
Jingwen Chen
16795963e9 Merge "Add os/target configurable selects for label list attributes." am: 1a6bbbd990
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652048

Change-Id: I7299aee434717d8087ceeec2f5851fb129f9bef7
2021-04-05 07:40:59 +00:00
Jingwen Chen
2f6a21e957 Export OsTypeList through a function.
This is a cleanup CL to make the OsTypeList accessor consistent with
ArchTypeList by creating a function that creates a copy of the
underlying slice.

Test: TH
Change-Id: I346c5c3937bbdb8a373e4d7135b896a5274cc1f1
2021-04-05 07:35:06 +00:00
Jingwen Chen
1a6bbbd990 Merge "Add os/target configurable selects for label list attributes." 2021-04-05 07:09:48 +00:00
Jiyong Park
f58c46e36f Don't use incorrect version names like VER or BOARD even in tests
All version names will go through ApiLevelFromUser which triggers an
error when the name is not a valid one.

Bug: 175678607
Test: m
Change-Id: Id33bf64085603914d45ad7942cb8908a4734493f
2021-04-05 09:32:06 +09:00
Jiyong Park
54105c48f4 SdkSpec = Scope + ApiLevel
SdkSpec.Version was an int type. Now it becomes ApiLevel type which
is a better abstraction of the version (or api level).

Bug: 1655587
Test: m

Change-Id: I4d67b9b9eae45f653b6af4f5b73da9e091b3dfab
2021-04-05 09:32:06 +09:00
Inseob Kim
726c75b9d9 Merge "Support super image size automatic calculation" am: 0774773a65
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1658164

Change-Id: I5acf77756b7bd85be2c111510d88058efc3acbe6
2021-04-04 11:11:17 +00:00
Inseob Kim
0774773a65 Merge "Support super image size automatic calculation" 2021-04-04 10:46:25 +00:00
Jiyong Park
7ff95eca2f Merge "Move java.sdkSpec to the android package" am: d4fa8fc107
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655587

Change-Id: I0a90dcb1342c670a0e32e081051069aad492fc48
2021-04-03 11:48:14 +00:00
Jiyong Park
d4fa8fc107 Merge "Move java.sdkSpec to the android package" 2021-04-03 11:20:10 +00:00
Yi Kong
171c509cb9 Merge "Fix toc.sh, llvm-nm does not recognise '-f P' option" am: 15f5d688d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663144

Change-Id: I27e1f231813a350a3eabfc17aba6ae172546710b
2021-04-03 04:46:41 +00:00
Ryan Prichard
c2018e2ed4 Remove libgcc toolchain libs for Android
Remove Android-targeting gcc toolchain libraries -- libgcc,
libgcc_stripped, libatomic, and libgcov. Also remove libunwind_llvm,
which is replaced with a libunwind toolchain prebuilt.

The __atomic_* library functions are now part of the compiler-rt
builtins library:

https://android-review.googlesource.com/c/toolchain/llvm_android/+/1625025

Bug: http://b/153025717
Test: treehugger
Change-Id: I971d0a4a49f1aaeb3546e80b6d94208277a171ac
2021-04-02 21:07:35 -07:00
Yi Kong
15f5d688d0 Merge "Fix toc.sh, llvm-nm does not recognise '-f P' option" 2021-04-03 03:59:26 +00:00
Rupert Shuttleworth
523b14d5c4 Merge "Allow Bazel actions to see the SHELL variable." am: 176cf46f40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663462

Change-Id: I26595f770e8db4b3ffa8b45f74414aaed3bad81e
2021-04-03 03:41:36 +00:00
Rupert Shuttleworth
176cf46f40 Merge "Allow Bazel actions to see the SHELL variable." 2021-04-03 03:07:36 +00:00
Jiyong Park
f1691d2a2c Move java.sdkSpec to the android package
... in preparation for making the handling of sdk versions consistent
across java and cc modules.

Bug: 175678607
Test: m
Change-Id: I598f0454bce9b7320621022115412fbe97403945
2021-04-03 08:25:12 +09:00
Treehugger Robot
c7a2bd6b6e Merge "Remove unused cquery requests." am: 100d5d6732
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663379

Change-Id: I06feaf98a951e271916dbd26bc07da0e5ec4ad08
2021-04-02 22:30:48 +00:00
Chris Parsons
e59af4e1c0 Use correct includes for mixed build gen headers
Previously, genrules which were used as generated_headers only
propagated the old Soong gen directory as an include path, even if the
genrule was managed by Bazel. With this chance, the gen directory of the
Baze output files are used in mixed-build mode.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: m libc
Change-Id: I3913c4e5b0354421ba1fe43d1f6ef4d1e729a058
2021-04-02 18:27:21 -04:00
Treehugger Robot
100d5d6732 Merge "Remove unused cquery requests." 2021-04-02 21:50:40 +00:00
Rupert Shuttleworth
bf94d2fdba Allow Bazel actions to see the SHELL variable.
Test: TH
Change-Id: I97ffe7ad84dfb8d58d0e6d022f73d97a73778129
2021-04-02 20:09:51 +00:00
Yi Kong
6f43f54264 Fix toc.sh, llvm-nm does not recognise '-f P' option
llvm-nm only accepts full name for format option, or just '-P' alias.

Test: build
Bug: 184360305
Change-Id: Ie25f5410403f4dbca564430149a5753e0d48d60d
2021-04-03 03:21:24 +08:00
Liz Kammer
cf58a4d272 Merge "Add depfile handling for bazel_handler." am: 5ad66aaf41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1653143

Change-Id: I67cc14fe31353fd449587cab6d056d8500b8b881
2021-04-02 17:14:07 +00:00
Liz Kammer
5ad66aaf41 Merge "Add depfile handling for bazel_handler." 2021-04-02 17:06:07 +00:00
Steven Moreland
3f34589233 Merge "Export header check allows WholeStaticLibs" am: f42daa716c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662670

Change-Id: I701cd70f484d45c3e5755e56692b8cd4ddf3d8a2
2021-04-02 16:58:12 +00:00
Ivan Lozano
c044f5bce8 rust: Update libfuzzer flags for rust_fuzz
libfuzzer-sys uses different flags in the 0.4.0 update, so update the
flags for rust_fuzz modules to align.

Test: m <example_fuzzer>
Change-Id: I0a1eb140a7843fdaf5266c05a1ecf6d3964e0f5e
2021-04-02 12:43:28 -04:00
Jaewoong Jung
f7c8d8a746 Merge "Revert "Revert "Add min_sdk_version to java_import.""" am: d0afefa4b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663082

Change-Id: I3c9fb749aa4584e158696f16a43eb2ef0f712568
2021-04-02 16:27:17 +00:00
Colin Cross
107c6aaef5 Merge "Silence kotlinc JDK9 warnings" am: 2fbc234fd6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1656462

Change-Id: If91250912aec76e676ae4c0180f69e9c1c4a6e36
2021-04-02 16:10:51 +00:00
Steven Moreland
f42daa716c Merge "Export header check allows WholeStaticLibs" 2021-04-02 16:03:59 +00:00
Jaewoong Jung
d0afefa4b1 Merge "Revert "Revert "Add min_sdk_version to java_import.""" 2021-04-02 15:49:58 +00:00
Colin Cross
2fbc234fd6 Merge "Silence kotlinc JDK9 warnings" 2021-04-02 15:39:13 +00:00
Liz Kammer
09f9231e91 Remove unused cquery requests.
Test: go test soong tests
Change-Id: Ie7a72bc73ccf4d9b8aa2a0b20c1674d3a5b499de
2021-04-02 11:03:15 -04:00
Liz Kammer
3cf5211890 Add bazel_module properties to cc_defaults
Test: go soong tests
Test: add bazel_module to Android.bp file and m nothing
Change-Id: I13c3e8d59536dbea88f3495309f4f64e849ede9f
2021-04-02 08:44:31 -04:00
Jingwen Chen
91220d7334 Add os/target configurable selects for label list attributes.
This CL is pretty large, so I recommend starting with reading the newly
added tests for the expected behavior.

This change works in conjunction with the linked CLs in the Gerrit topic.
Those CLs add support for new platform() definitions for OS targets
specified in Soong's arch.go, which are configurable through
Android.bp's `target {}` property. It works similary to previous CLs
adding support for the `arch {}` property.

These configurable props are keyed by the OS: android, linux_bionic,
windows, and so on. They map to `select` statements in label list
attributes, which this CL enables for cc_library_headers' header_libs
and export_header_lib_headers props.

This enables //bionic/libc:libc_headers to be generated correctly, from:

    cc_library_headers {
        name: "libc_headers",
        target: {
            android: {
                header_libs: ["libc_headers_arch"],
                export_header_lib_headers: ["libc_headers_arch"],
            },
            linux_bionic: {
                header_libs: ["libc_headers_arch"],
                export_header_lib_headers: ["libc_headers_arch"],
            },
        },
        // omitted props
    }

to:

    cc_library_headers(
        name = "libc_headers",
        deps = [] + select({
            "//build/bazel/platforms/os:android": [
                ":libc_headers_arch",
            ],
            "//build/bazel/platforms/os:linux_bionic": [
                ":libc_headers_arch",
            ],
            "//conditions:default": [],
        }),
    )

Test: TH
Test: Verify generated //bionic/libc:libc_headers
Fixes: 183597786

Change-Id: I01016cc2cc9a71449f02300d747f01decebf3f6e
2021-04-02 08:17:34 +00:00
Jaewoong Jung
56e12dbbaf Revert "Revert "Add min_sdk_version to java_import.""
This reverts commit 5ab6508008.

Reason for revert: Resubmitting Ie255f74d40432f4bdd0092d618705a7d17235e58 after fixing the broken targets.

Bug: 183695497
Test: https://android-build.googleplex.com/builds/forrest/run/L58600000849810513
Change-Id: I5f072f396002ca3a45bd530ad9be987efa732833
2021-04-02 04:55:27 +00:00
Julien Desprez
d27a7fad3f Merge "Remove tradefed static_lib heuristic" am: cb05715e9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638101

Change-Id: I75312967ceead525d02c9171480b8c78e2d41a88
2021-04-02 04:22:25 +00:00
Julien Desprez
cb05715e9e Merge "Remove tradefed static_lib heuristic" 2021-04-02 03:47:13 +00:00
Yi Kong
115fc28122 Merge "Move toc.sh to use LLVM binutils" am: 948205699b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1661823

Change-Id: I4a1a0741560a9122e2656cefa8624fd28a07859f
2021-04-02 03:23:57 +00:00
Yi Kong
948205699b Merge "Move toc.sh to use LLVM binutils" 2021-04-02 02:38:16 +00:00
Jaewoong Jung
7644361eef Merge "Revert "Add min_sdk_version to java_import."" am: 37a5d5ebd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663080

Change-Id: Ie97a1b3bd0d2bbcd6feb64c3aa9018a431157007
2021-04-02 01:14:07 +00:00
Jaewoong Jung
37a5d5ebd8 Merge "Revert "Add min_sdk_version to java_import."" 2021-04-02 00:34:06 +00:00
Jaewoong Jung
5ab6508008 Revert "Add min_sdk_version to java_import."
This reverts commit 6d15d63556.

Reason for revert: Broke git_sc-mainline-prod on test_suites_x86_64

Fixes: 184305592
Change-Id: I4b2e2675e0dd9e2e84966f545a52f45d5b731bab
2021-04-02 00:17:59 +00:00
Steven Moreland
ba407c8afa Export header check allows WholeStaticLibs
cc/linker.go code assumes that export_static_lib_headers can apply
regardless of whether a library is a regular or 'whole' static lib.
However, this check prevents that code from working.

Bug: 183654927
Test: use export_static_lib_headers like this
Change-Id: I680f90514e41224a7077630167ab4e481909d89c
2021-04-02 00:03:44 +00:00
Ryan Prichard
a9cf131c22 Merge "Revert^2 "Switch platform-NDK unwinder to LLVM libunwind.a prebuilt"" am: 252831b03a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1661300

Change-Id: I5b330c63f7ac37ed479cc776d6f642f1419de5b5
2021-04-01 23:19:45 +00:00
Ryan Prichard
252831b03a Merge "Revert^2 "Switch platform-NDK unwinder to LLVM libunwind.a prebuilt"" 2021-04-01 22:42:33 +00:00
Treehugger Robot
2b4fc842c3 Merge "bp2build: don't generate a WORKSPACE." am: acabe1b625
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1661819

Change-Id: Id8613659c572d8bbdffbd107a5536ed540ca90eb
2021-04-01 21:34:32 +00:00
Treehugger Robot
acabe1b625 Merge "bp2build: don't generate a WORKSPACE." 2021-04-01 20:59:01 +00:00
Jaewoong Jung
e37f90021f Merge "Add min_sdk_version to java_import." am: 51a0d85ebc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660819

Change-Id: I3910928b88293464faa18d4a6c1a0b1e6d1871a9
2021-04-01 20:12:41 +00:00
Jaewoong Jung
51a0d85ebc Merge "Add min_sdk_version to java_import." 2021-04-01 19:45:53 +00:00
Lukács T. Berki
ae5bf80c7c Merge "Reorganize soong_build/main.go ." am: c5b3a1722c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662203

Change-Id: I822eed4dbe069298e929114ef0f37b4c0ca459f6
2021-04-01 19:13:21 +00:00
Paul Duffin
cdc1757b07 Merge "Convert remaining rust tests to use test fixtures" am: e6165d0f46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1658074

Change-Id: Iee307b1ed305c2c253177303a83da5adef64e54f
2021-04-01 19:07:51 +00:00
Lukács T. Berki
c5b3a1722c Merge "Reorganize soong_build/main.go ." 2021-04-01 19:05:31 +00:00