Commit graph

38348 commits

Author SHA1 Message Date
Anton Hansson
35c86c07ed Add support for extension version in variables
This makes the sdk extension version usable in genrule cmds via %d.

Bug: 195281582
Test: current_sdkinfo module in packages/modules/common.
Merged-In: I82a90b83d23b0ba3779a943c2ad444bf5cf937da
Change-Id: I82a90b83d23b0ba3779a943c2ad444bf5cf937da
2021-08-27 17:35:40 +01:00
Colin Cross
b37a92ccc8 Merge "Support musl builds in Make" 2021-08-26 01:14:47 +00:00
Jiyong Park
19312d4224 Merge changes I15328e0b,I731227c2
* changes:
  crt objects for APEX and vendor variants have correct target API levels
  crt modules produces cc rules for testing
2021-08-25 22:30:40 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
bb1fd68495 Merge "Add python_library -> py_library bp2build support" 2021-08-25 20:25:42 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
0fc781c7c2 Add python_library -> py_library bp2build support
Bug: 196091681
Test: bp2build/python_library_conversion_test.go
Test: build/bazel/ci/mixed_{libc,droid}.sh
Change-Id: Ice87d75533c97fd9c139dc59de09a039e2713a01
2021-08-25 15:57:01 +00:00
Florian Mayer
35fc86c9cf Merge "Use new pass manager for HWASan builds." 2021-08-25 10:39:37 +00:00
Jiyong Park
5df7bd33f7 crt objects for APEX and vendor variants have correct target API levels
Previously, crt objects for APEX and vendor variants targetted API level
16 regardless of their context. For example, even if BOARD_VNDK_VERSION
is set to 29, or an APEX has `min_sdk_version: "29"`, the target API
level was from `min_sdk_version` property of the crt object which is set
to 16.

The meaning of min_sdk_version is quite different when it comes to crt
objects. It means the lowest API level that it CAN target for. It does
NOT mean the API level it SHOULD always target.

This has caused some other problems like TLS segment underalignment for
vendor libraries because the vendor libraries were all built with TLS
layout from API level 16.

This change fixes the problem by correctly implementing the different
semantic of min_sdk_version for crt objects.

Bug: N/A
Test: m nothing

Change-Id: I15328e0b6cbabbe151dd65c7469c6355e167b78a
2021-08-25 16:26:47 +09:00
Jiyong Park
7549d460f0 crt modules produces cc rules for testing
Previously, crt modules didn't produce cc rules because they didn't have
any input src files set. This prevented us from having a test which
checks the cflags of the crt modules.

Fixing that by adding source file to the crt modules. crtbrand is also
added as an 'objs' dep, because otherwise partialLd rules won't be
generated.

Bug: N/A
Test: m nothing
Change-Id: I731227c20c662c876c40f0c41e1769a271e2c643
2021-08-25 16:16:03 +09:00
Sophie Zheng
d9287b6c35 Merge "Also generate api lists based on symbol files for cc_library rule during build time." 2021-08-25 04:16:34 +00:00
Treehugger Robot
c5e452b2c5 Merge changes from topic "ninja_static"
* changes:
  Fix crtend for musl static binaries
  Support static_executable: true for musl builds
  Use SystemSharedLibs as StaticLibs for static executables
2021-08-25 02:28:07 +00:00
sophiez
4c4f80326d Also generate api lists based on symbol files for cc_library rule during build time.
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist DIST_DIR=/usr/local/google/home/sophiez/my_dist_dir EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true SKIP_BOOT_JARS_CHECK=true

Change-Id: Ic857c14c5c258b8f4d150cc71ce9eabce33d7d54
2021-08-24 17:39:45 -07:00
Treehugger Robot
0fea970b41 Merge "Suggest using add_soong_config_ macros instead of direct variable assignments" 2021-08-24 22:53:48 +00:00
Sasha Smundak
18fd099982 Suggest using add_soong_config_ macros instead of direct variable assignments
Bug: 190051051
Test: treehugger
Change-Id: Ib77d8af8f926412f6337173927cee6bb1deda2bb
2021-08-24 14:06:20 -07:00
Colin Cross
f26b466cad Fix crtend for musl static binaries
Bug: 190084016
Test: aosp-build-tools linux_musl build
Change-Id: Ia78884cd24f5b7d8aa8207268539cfb453666699
2021-08-24 13:39:02 -07:00
Colin Cross
a793db33a2 Support static_executable: true for musl builds
Bug: 190084016
Test: aosp-build-tools linux_musl build
Change-Id: I630c54033c44ddd6b54388ed36642629cf2e4e5b
2021-08-24 13:39:02 -07:00
Colin Cross
450744e718 Use SystemSharedLibs as StaticLibs for static executables
Shared libraries are ignored for static executables, treat
SystemSharedLibs as StaticLibs to avoid every static executable
having to list libc as a static dependency.

Test: m checkbuild
Change-Id: I02442a1a2a8d4164ec3dd389a16da2346e2d8751
2021-08-24 13:39:02 -07:00
Treehugger Robot
92aa7b712e Merge "eng builds: dexpreopt: stop explicitly removing minidebuginfo" 2021-08-24 17:12:41 +00:00
Joel Galenson
7c16dabfa5 Merge "Add system/logging/liblog." 2021-08-24 14:12:48 +00:00
satayev
28e5eda261 Merge "Make sure that classpath fragment contents appear in make vars." 2021-08-24 13:29:58 +00:00
Liz Kammer
f32f2d6b6d Merge "Update HostAndDevice* documentation" 2021-08-24 12:34:23 +00:00
Ulyana Trafimovich
81a1adb6db Merge "Don't add uses_libs/optional_uses_libs to the manifest_fixer." 2021-08-24 09:18:06 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
5272a41283 Merge changes from topic "share-runBp2BuildTestCase+runPythonTestCase"
* changes:
  Add License decl to testing.go
  Document testing & build_conversion purposes
  Rename runPythonTestCase
  Share runBp2BuildTestCase & runPythonTestCase
2021-08-24 01:11:14 +00:00
Treehugger Robot
373e71c5d4 Merge "Apply pylint to build/soong/cc/ndk_api_coverage_parser" 2021-08-23 22:42:05 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
f5a3eacc07 Add License decl to testing.go
Test: Existing tests pass
Change-Id: I0d8b77d87801cb361036c8788f30bd80070fd7ff
2021-08-23 22:07:12 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
0da7ce6f39 Document testing & build_conversion purposes
Formatter also relocated some imports

Test: Existing tests pass
Change-Id: I48b1cb65400e463a6b4e91fd9fe76e13d8d81cd6
2021-08-23 22:04:53 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
ce0a07e249 Rename runPythonTestCase
To runBp2BuildTestCaseSimple because it's not Python-specific
but rather Bp2Build-specific

Name is suboptimal but given current functionality and use
we couldn't come up with a better one.

Test: Existing tests pass
Change-Id: I641cd051af741836b21ec6a7d6639516fb13028f
2021-08-23 22:02:20 +00:00
Liz Kammer
8631cc7327 Update HostAndDevice* documentation
Clarify that HostAndDeviceSupported builds _only_ Device by default,
and add information on how to built host variations.
For HostAndDeviceDefault, clarify how to disable different variants.

Change-Id: I20e30175ddf79038117f1df166d9b994237b27f5
2021-08-23 21:12:08 +00:00
Joel Galenson
a7614dd626 Add system/logging/liblog.
This is needed so it can run bindgen tests.

Test: Build
Change-Id: Iefcd1077e3b572c662474c4bb461b04dc66c6204
2021-08-23 14:02:49 -07:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
1c92aeff4e Share runBp2BuildTestCase & runPythonTestCase
Pull along bp2buildTestCase as well
Because none are specific to their current hosts

Move `errored` up to the "generic" block vs.
the "custom" block

Test: Existing tests pass
Change-Id: Ie8d5322a5554ebd88f0c142a4c541791687be326
2021-08-23 19:20:29 +00:00
Colin Cross
b3c68004af Merge "Set ANDROID_HOST_MUSL for musl builds" 2021-08-23 18:47:40 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
8f33dcc9e3 Merge "Fix inverted error message" 2021-08-20 22:20:23 +00:00
Treehugger Robot
899b98d508 Merge "rust: doc: Zip up docs when done" 2021-08-20 22:11:17 +00:00
Treehugger Robot
13b3b785ec Merge "rust: Hook up InstallIn functions + Product" 2021-08-20 21:03:18 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
d75507fff7 Fix inverted error message
The code checks to see if the `child` is not a Python library,
but then when reporting the error it uses the module name as
the dependency name and the child (dependency) as the module name

Test: Existing tests pass
Change-Id: Ied606342291312d8485a8fd2ddcc580ad24ae82f
2021-08-20 21:02:43 +00:00
Matthew Maurer
ca68c49621 rust: doc: Zip up docs when done
Fetching artifacts from the build server doesn't go well with large
numbers of files in nested directories.

Produce an additional rustdoc.zip artifact to make this easier.

This change also prevents ${DIST} from receiving the unpacked rustdoc
site. This can be changed if b/188822051 is fixed.

Bug: 162741284
Test: m rustdoc; check resulting zip contents manually
Change-Id: I80b6a8fa6e274d2d8c3419d8734251afd4d7dba7
2021-08-20 13:08:16 -07:00
Matthew Maurer
9f59e8db27 rust: Hook up InstallIn functions + Product
InstallIn functions must be hooked up not only to install to special
images, but also to receive special handling by android/arch.go such
that some images are implicitly multilib: first.

Also hook up more product details.

Bug: 178565008
Bug: 165791368
Test: lunch aosp_arm64; m
Change-Id: I1980d5aa9d55f78c222b98d60a404cd6ea5abbfb
2021-08-20 12:14:54 -07:00
Ulya Trafimovich
0b1c70efbc Don't add uses_libs/optional_uses_libs to the manifest_fixer.
These properties specify libraries that cannot be implicitly inferred by
Soong. If these properties are added to Android.bp, this can only be for
the reason that there is a <uses-library> tag in the manifest which is
unknown to the build system. Adding them to the manifest_fixer doesn't
make sense: if they are not in the manifest, they should be removed from
Android.bp as well.

Bug: 132357300
Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd
      $ adb wait-for-device && adb root && adb logcat \
        | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
        # empty grep output, no errors
Change-Id: Ic6eb5268a954ef3be7f06a181ec72af99000c547
2021-08-20 15:54:42 +01:00
Florian Mayer
7c02c0883a Use new pass manager for HWASan builds.
Now that we have rolled to a sufficiently new clang, HWASan also works
with the new pass manager.

Bug: 135298400
Test: introduce memory safety bug and verify HWASan gets triggered.
Change-Id: I497ca6542971569cbcad949780e4c7df5b0bfb44
2021-08-20 10:07:20 +01:00
Treehugger Robot
99d5a0f5c9 Merge "Revert "Revert "Apply pylint to cc/symbolfile""" 2021-08-19 20:51:40 +00:00
Spandan Das
3f5659f268 Revert "Revert "Apply pylint to cc/symbolfile""
This reverts commit ea28f4cae7.

Reason for revert: Postsubmit failure was unrelated, and was fixed by this revert CL aosp/1802327

Change-Id: I2693b17c2261cfc3dce0ed69baeb2d1f45f784f8
2021-08-19 19:31:54 +00:00
Lukács T. Berki
5470d24ab7 Merge "Use combined.ninja for soong_docs null build test." 2021-08-19 18:04:00 +00:00
Lukacs T. Berki
1a86bd2dc4 Use combined.ninja for soong_docs null build test.
This requires some explanation: turns out, Ninja uses the $builddir
variable declared in the top-level Ninja file to figure out where the
command log should go. This resulted in a loss of incrementality between
the manual Ninja invocation in test_null_build_after_docs because they
used different Ninja files and therefore different values of $builddir.

The reason why this was not a problem before is that the output files of
the main Ninja file and the bootstrap one were separate, but with that
changing, this will start to matter.

Test: Presubmits.
Change-Id: I28959cc7d659e698c7694a58326c8731eac060eb
2021-08-19 16:29:47 +02:00
Treehugger Robot
9ab1e685ee Merge "Revert "Apply pylint to cc/symbolfile"" 2021-08-19 11:43:17 +00:00
Ulyana Trafimovich
abcce6f1c3 Merge "Propagate <uses-library> dependencies from java_library to apps." 2021-08-19 09:14:33 +00:00
Junwei Wang
ea28f4cae7 Revert "Apply pylint to cc/symbolfile"
This reverts commit 73de70264a.

Reason for revert: Broken build 7651218 on aosp-master on aosp_x86_64-userdebug -- b/197190129

Change-Id: I18387e5d2765fecb292127d09e3bbe7cf19b5efd
2021-08-19 08:10:05 +00:00
Treehugger Robot
1c700090e9 Merge "Apply pylint to build/soong/bloaty" 2021-08-19 07:16:04 +00:00
Lukács T. Berki
1e255cf16d Merge "Do globbing-related paperwork explicitly." 2021-08-19 06:17:32 +00:00
Treehugger Robot
4132ef45bb Merge "Collect info on non-cc sources in a cc module." 2021-08-19 05:55:43 +00:00
Matthew Maurer
a8b1ab0370 Merge changes I9682b978,I35465715,I9c5aa5f3,I1c76e620
* changes:
  Support Rust in Ramdisk
  Support Rust in native-bridge
  Support Rust in Product
  Support Rust in Recovery
2021-08-19 02:55:46 +00:00
Colin Cross
c74ea4b77b Support musl builds in Make
Rewrite linux_musl to linux when exporting to Make.

Bug: 190084016
Test: m USE_HOST_MUSL=true adb
Change-Id: I48eed5bd7380a07c5106a9b2bd96899fb58f7a7f
2021-08-18 22:02:54 +00:00