Commit graph

38363 commits

Author SHA1 Message Date
LaMont Jones
5569d6eb47 Deprecate group_static_libs property
We now default to lld for platform builds, removing all need for this
property.  For more details, see "Effecient archive file handling" in
https://lld.llvm.org/NewLLD.html#key-concepts

Bug: 189475744
Test: Manual build succeeds
Change-Id: If1104d68b13de8c7afab35c1741a68f64394b448
2021-08-30 23:13:03 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
560cb6685c python_{binary,library}{,_host} handle lib property
Have binary and library bp2build convert `libs` to
`deps` for bazel

Bug: 196083751
Test: python_{binary,library}_conversion_test.go
Test: build/bazel/ci/mixed_{libc,droid}.sh
Change-Id: I2d5f6ef2e83dd608910edb7adb2eb9a56d25293c
2021-08-27 14:10:33 +00:00
Lukács T. Berki
5602d33025 Merge "Rename BuildDir and NinjaBuildDir." 2021-08-27 13:39:11 +00:00
Nicolas Geoffray
7e4c05fcc8 Merge "Add exclude_runtime_libs to more targets." 2021-08-27 11:33:39 +00:00
Lukacs T. Berki
9f6c24a887 Rename BuildDir and NinjaBuildDir.
These are just out/ and out/soong/ and the old names were quite
confusing.

Test: Presubmits.
Merged-In: I999ca62162062f27e449f83ffb00fa580d4065b8
Merged-In: I2fcd80a9e376a6842a06aa104a9f6f5c5e16f8c7
Change-Id: Ib481d2aac40df8da1b74174dc8ec576c1cb48be0
2021-08-27 10:08:49 +02:00
Treehugger Robot
60dc5c0db2 Merge "Make bpfs properties overridable" 2021-08-27 04:57:10 +00:00
Treehugger Robot
5edc77d06c Merge "Apply pylint to conv_linker_config.py" 2021-08-27 04:04:14 +00:00
markchien
7c803b8746 Make bpfs properties overridable
To support different variable bpfs file between mainline module and
non-updatable module(e.g. Android GO). Make bpfs properties overridable.

Test: m
Bug: 190523685
Change-Id: I4c63e35f74230de94b21f3ceb2beb90f0f9ddb11
2021-08-27 03:03:45 +00:00
Matthew Maurer
80f0eb1e01 rust: Add UWB to allowlist
Change-Id: Ic89e274412c97631f615e6e9ccd711e9300397d1
Test: None
2021-08-26 20:38:16 +00:00
Treehugger Robot
af44faad9f Merge "Apply pylint to scripts/construct_context*.py" 2021-08-26 16:57:10 +00:00
Spandan Das
1d4bfd8ca4 Apply pylint to conv_linker_config.py
1. Run pyformat scripts/conv_linker_config.py -s 4 --force_quote_type none -i to fix formatting
2. Annotate #pylint: disable=import-error for linker_config_pb2 since it
will be provided by soong

Test: m conv_linker_config
Test: pylint --rcfile tools/repohooks/tools/pylintrc
build/soong/scripts/conv_linker_config.py
Bug: 195738175

Change-Id: I791576cf65cb053f68c804f8ec5c2fc22976fdb4
2021-08-26 16:48:59 +00:00
Treehugger Robot
9da0a435ef Merge "Keep existing BUILD files for bazel_common_rules" 2021-08-26 16:41:30 +00:00
Martin Stjernholm
3aa9544ec1 Add exclude_runtime_libs to more targets.
Test: `m droid` with https://r.android.com/1810717
Bug: 197856821
Change-Id: I4c93ae4b1f686796827a9635ba4ed50db00e6a8c
2021-08-26 17:29:49 +01:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
dc212c0b24 Add python_library_host -> py_library bp2build support
Bug: 196081770
Test: bp2build/python_library_conversion_test.go
Test: build/bazel/ci/mixed_{libc,droid}.sh
Change-Id: I4da9938eb0b039f97b83badd2269af153c7edbcc
2021-08-26 16:03:34 +00:00
Colin Cross
b37a92ccc8 Merge "Support musl builds in Make" 2021-08-26 01:14:47 +00:00
Spandan Das
ec555f1a99 Apply pylint to scripts/construct_context*.py
1. Run pyformat scripts/construct_context.py -s 4 --force_quote_type
none -i to fix formatting
2. Wrap #pylint: [disable|enable]=line-too-long in tests

Test: m construct_context construct_context_test
Test: pylint --rcfile tools/repohooks/tools/pylintrc
build/soong/scripts/construct_context.py
build/soong/scripts/construct_context_test.py
Bug: 195738175

Change-Id: I2e756b17aae3e70ddaa03356c78f1f2f85c0f6a5
2021-08-26 01:06:48 +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
Jingwen Chen
5e49b82e59 Keep existing BUILD files for bazel_common_rules
Test: presubmits

Bug: 197589841
Change-Id: I6a528fc8e66ce6322e87db975f7656571407c7a1
2021-08-24 05:14:22 +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