Commit graph

34865 commits

Author SHA1 Message Date
Chris Parsons
eefc9e6a62 Fix note_memtag bionic libraries in mixed builds
Required fixes:
  - Set MakeLinkType for libraries, even in mixed build mode.
  - Set snapshot header information to empty list, which passes
        validation logic for depending modules

Fixing these libraries also requires a Starlark change to
cc_library_static.bzl, which will be submitted separately.

Additionally, this adds better error messaging in the event that
output files are missing from a mixed-build library.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: USE_BAZEL_ANALYSIS=1 m runtime-module-sdk
Change-Id: Iad2c4d46359986fb0a43263292a15ed45fabbac7
2021-04-05 15:27:55 -04:00
Christopher Parsons
012ae1f4e0 Merge "Use correct includes for mixed build gen headers" 2021-04-05 19:03:47 +00:00
Joel Galenson
1301b5ccad Merge "Add system/core/libstats to the Rust allowed list." 2021-04-05 18:50:47 +00:00
Ivan Lozano
d235269392 Merge "rust: Update libfuzzer flags for rust_fuzz" 2021-04-05 15:05:00 +00:00
Liz Kammer
9962daec01 Merge "Add bazel_module properties to cc_defaults" 2021-04-05 12:33:21 +00:00
Jingwen Chen
1a6bbbd990 Merge "Add os/target configurable selects for label list attributes." 2021-04-05 07:09:48 +00:00
Inseob Kim
0774773a65 Merge "Support super image size automatic calculation" 2021-04-04 10:46:25 +00:00
Jiyong Park
d4fa8fc107 Merge "Move java.sdkSpec to the android package" 2021-04-03 11:20:10 +00: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
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
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
5ad66aaf41 Merge "Add depfile handling for bazel_handler." 2021-04-02 17:06:07 +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
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
cb05715e9e Merge "Remove tradefed static_lib heuristic" 2021-04-02 03:47:13 +00:00
Yi Kong
948205699b Merge "Move toc.sh to use LLVM binutils" 2021-04-02 02:38:16 +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
252831b03a Merge "Revert^2 "Switch platform-NDK unwinder to LLVM libunwind.a prebuilt"" 2021-04-01 22:42:33 +00:00
Treehugger Robot
acabe1b625 Merge "bp2build: don't generate a WORKSPACE." 2021-04-01 20:59:01 +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
c5b3a1722c Merge "Reorganize soong_build/main.go ." 2021-04-01 19:05:31 +00:00
Paul Duffin
e6165d0f46 Merge "Convert remaining rust tests to use test fixtures" 2021-04-01 18:13:23 +00:00
Lukacs T. Berki
6790ebcc59 Reorganize soong_build/main.go .
This makes it more easy to see what's happening under which modes. Modes
are:

- Regular builds
- Mixed mode builds
- bp2build
- soong_docs

Test: Presubmit + bootstrap_test.sh
Change-Id: I06e3fcb84986b919be1cd9eb456531259ede1183
2021-04-01 18:01:14 +02:00
Paul Duffin
379f36b6e5 Merge changes Idc01d3cc,I644db99c
* changes:
  Remove FixturePreparer.Extend()
  Remove FixtureFactory
2021-04-01 14:34:02 +00:00
Nikita Ioffe
6f77314381 Merge "Revert "Allow dependencies from platform variants to APEX modules."" 2021-04-01 14:22:53 +00:00
Jingwen Chen
6c309cd0ac bp2build: don't generate a WORKSPACE.
bp2build doesn't need to generate a WORKSPACE file.

Also cleanup conversion_test.go.

Test: TH
Change-Id: Iba2f4b2f71d72ccf8b148cd11d78c190f93560c4
2021-04-01 11:50:27 +00:00
Nikita Ioffe
d64139f8e5 Revert "Allow dependencies from platform variants to APEX modules."
Revert submission 1658000

Reason for revert: Breaks full-eng build: b/184239856
Reverted Changes:
I4f8ead785:Avoid internal APEX stubs for libsigchain and clea...
I68affdf69:Allow dependencies from platform variants to APEX ...
I54b33784e:Rename libdexfile_external_static to libdexfile_st...
Id68ae9438:libdexfile_external is being replaced by libdexfil...
I12ac84eb4:libdexfile_external is replaced by libdexfile.
If05dbffc8:Rename libdexfile_external_static to libdexfile_st...
Ia011fa3a8:Merge libdexfile_external into libdexfile.

Change-Id: If494dc5385042a4620a76a9eadc1613ae0eb1655
2021-04-01 10:58:24 +00:00
Paul Duffin
abc89cf86b Merge "Remove apexFixtureFactory" 2021-04-01 10:26:15 +00:00
Ulyana Trafimovich
400a1b1309 Merge "Emit a better error message in manifest_check.py." 2021-04-01 09:58:15 +00:00
Yi Kong
4ad44e713b Move toc.sh to use LLVM binutils
Test: build
Change-Id: Ib965b6ea3fba6ae007135ac7e167cc50f0f6e3de
2021-04-01 17:45:42 +08:00
Paul Duffin
920e205e9d Merge "Add a new platform_bootclasspath module type" 2021-04-01 09:38:57 +00:00
Paul Duffin
79abe57f53 Remove FixturePreparer.Extend()
Use GroupFixturePreparers instead.

Bug: 182885307
Test: m nothing
Change-Id: Idc01d3cc5a57576a4cf417e9105d1ab851126e10
2021-04-01 10:33:20 +01:00
Paul Duffin
4814bb814a Remove FixtureFactory
Bug: 182885307
Test: m nothing
Change-Id: I644db99cc6905f544d3e7479b435be26dbf6c59b
2021-04-01 10:33:02 +01:00
Paul Duffin
284165afb5 Remove apexFixtureFactory
Bug: 182885307
Test: m nothing
Change-Id: I88c58bf6b4adda4017e54548748897c51c3f3aa1
2021-04-01 10:31:07 +01:00
Rupert Shuttleworth
97c4304ca9 Merge "Annotate bp2buildModuleDoNotConvertList with reasons for modules being blocked." 2021-04-01 09:17:12 +00:00
Martin Stjernholm
f8c9713fb8 Merge "Allow dependencies from platform variants to APEX modules." 2021-04-01 06:53:13 +00:00
Treehugger Robot
25c47a43a5 Merge ""current" is implicitly added to stubs.versions" 2021-04-01 04:53:55 +00:00
Rupert Shuttleworth
760fb185be Annotate bp2buildModuleDoNotConvertList with reasons for modules being blocked.
Test: bp2build write; bazel build //bionic/...
Change-Id: I6065c945dbb8747c85aa554eefb355afe58d2078
2021-04-01 04:38:08 +00:00