Commit Graph

34874 Commits

Author SHA1 Message Date
Anton Hansson 85822e9b5f Merge "Set min_sdk_version for java imports in pom2bp" 2021-04-06 11:46:30 +00:00
Jingwen Chen 8f8029a92b Merge "Add target/os configurable string_list attrs." 2021-04-06 09:47:24 +00:00
Lukacs T. Berki 97bb9f18ea Add dumping the module graph in JSON format.
Usage: SOONG_DUMP_MODULE_GRPH_JSON=<filename> m nothing

Test: The new test case in bootstrap_test.sh .
Change-Id: I69005a75d47dff915d27187645d0cd1cbb3467ef
2021-04-06 08:45:58 +02:00
Treehugger Robot 8c56183fb7 Merge changes Id33bf640,I4d67b9b9
* changes:
  Don't use incorrect version names like VER or BOARD even in tests
  SdkSpec = Scope + ApiLevel
2021-04-06 03:18:16 +00:00
Colin Cross 7fef94f57b Merge "Remove support for unsandboxed metalava" 2021-04-05 23:23:00 +00: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 c1c2650532 Add target/os configurable string_list attrs.
Starting with copts for cc_object, with an extracted function that can
be shared with other cc_* module types.

Test: TH
Change-Id: I9025232e83a3dcd0ca243387486fafbdbd3e2d9b
2021-04-05 11:27:19 +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 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
Anton Hansson 5d8652fcaf Set min_sdk_version for java imports in pom2bp
Previously min_sdk_version was only set for *_library build rules, and
not for *_import targets. This made min_sdk_version default to
sdk_version, which is usually "current", which is not correct for these
libraries.

Test: pom2bp -default-min_sdk_version 24 for androidx
Change-Id: I3b029315abeb559e66efad847ae664efb79f4509
2021-04-01 11:49:35 +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