Commit graph

38338 commits

Author SHA1 Message Date
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
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
Liz Kammer
380dbb9327 Merge "Don't create a new module for bp2build conversion." 2021-08-18 19:28:20 +00:00
Treehugger Robot
99f323425a Merge "Support product-copy-files-by-pattern macro" 2021-08-18 19:09:19 +00:00
Spandan Das
16c2b8c3d3 Apply pylint to build/soong/bloaty
1. Run black --line-length 80 -S build/soong/bloaty
to fix formatting
2. Annotate # pylint: disable=import-error to skip checks for imports.
The imports are provided by Soong during m <target>

Test: m bloaty_merger_test
Test: pylint --rcfile tools/repohooks/tools/pylintrc
build/soong/bloaty/bloaty_merger.py
build/soong/bloaty/bloaty_merger_test.py
Bug: 195738175

Change-Id: I4579a80203de41d48992424f264dd1cdbafc854c
2021-08-18 17:46:46 +00:00
Spandan Das
30eefd8b84 Apply pylint to build/soong/cc/ndk_api_coverage_parser
1. Run black --line-length 80 -S build/soong/cc/ndk_api_coverage_parser to
fix formatting
2. Annotate # pylint: disable=line-too-long for multi line strings in
test_ndk_api_coverage_parser.py

Test: pytest
build/soong/cc/ndk_api_coverage_parser/test_ndk_api_coverage_parser.py
Test: pylint --rcfile tools/repohooks/tools/pylintrc
build/soong/cc/ndk_api_coverage_parser
Bug: 195738175

Change-Id: Ifb6d4cd67399eb3fa201185c5d1ebc2544fa316f
2021-08-18 17:17:47 +00:00
Liz Kammer
5641096e7f Merge "Handle arch-specific/not properties the same." 2021-08-18 15:59:49 +00:00
Ulya Trafimovich
e4432874a9 Propagate <uses-library> dependencies from java_library to apps.
Automatically add `uses_libs`/`optional_uses_libs` properties specified
in `java_library` modules to the apps that transitively depend on these
libraries.

Note that a library may choose to specify its <uses-library> deps as
either optional or required. If this is not the right choice for an app,
it should be able to override it by specifying its own `uses_libs`/
`optional_uses_libs` properties.

Add Soong tests to cover the new cases.

Bug: 196377222
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I601f3e2830ed9699b78d911966ee70812d32b4f6
2021-08-18 16:57:11 +01:00
Jay Patel
eaf5e1b3ec Merge "Allow PRODUCT_CFI_INCLUDE_PATHS to work with blueprints also" 2021-08-18 15:18:41 +00:00
Lukacs T. Berki
809d2ed548 Do globbing-related paperwork explicitly.
In particular, the writing of build-globs.ninja and the collection of
glob list files for build.ninja.d is now done outside of the Blueprint
invocation.

This is useful because RunBlueprint() is sometimes called multiple times
in a single soong_build invocation and because now glob processing is
not hidden by the machinery of Blueprint.

Test: Presubmits.
Change-Id: I6eb19b357901e452e6d1e7ce055f8a3bab4a74f4
2021-08-18 17:11:56 +02:00
Martin Stjernholm
3931b8c70d Merge "Remove fallback workaround for APEX variants which is now unnecessary." 2021-08-18 08:37:06 +00:00
Sasha Smundak
0445308bc3 Support product-copy-files-by-pattern macro
Bug: 193566316
Test: internal
Change-Id: I5ffdbaee231669166aaa3f40f84ecac8f571f981
2021-08-17 18:15:03 -07:00