Commit graph

27596 commits

Author SHA1 Message Date
Jingwen Chen
b0a713acf9 Merge "bazel overlay: fix regression to "list of string" bpdocs type." 2020-11-06 00:04:04 +00:00
Treehugger Robot
f5b2a5feb7 Merge "rust_bindgen: respect custom OUT_DIR" 2020-11-05 19:54:46 +00:00
Ivan Lozano
86a1db7baf Merge "Add rust_grpcio module type." 2020-11-05 17:47:11 +00:00
Patrice Arruda
bb42c44e71 Merge "Collect useful resource information of each executed process in soong_ui." 2020-11-05 17:17:43 +00:00
Shao-Chuan Lee
aa3231cd6b rust_bindgen: respect custom OUT_DIR
Bug: 172551033
Test: m
Change-Id: I1f760de7cb03ec0bcad5c66ac08bb88ca77c26cd
2020-11-06 00:12:02 +09:00
Christopher Parsons
fde53fff96 Merge "After bazel execution, symlink results in out/" 2020-11-05 14:54:47 +00:00
Nikita Ioffe
a6d18b6830 Merge changes from topic "apex-allowed-deps"
* changes:
  Add PHONY for apex-allowed-deps check.
  Update apex/allowed_deps.txt
2020-11-05 14:02:33 +00:00
Ivan Lozano
6a3d1e9831 Add rust_grpcio module type.
Adds a new SourceProvider type to generate grpcio code from protos.
Since it's so similar to protobuf, it's basically just a different type
of rust_protobuf.

Bug: 171504899
Test: Example module compiles.
Change-Id: I9882f3ac4d4aeaae0191f2b557e9612b5c7a9ac9
2020-11-05 08:53:52 -05:00
Jingwen Chen
222ff4d186 bazel overlay: fix regression to "list of string" bpdocs type.
A recent change to Blueprint [1] added the feature to infer the type of
list elements to more than just "list of strings", but this also changed
the text to "list of string" (without s). This CL fixes the bazel
overlay, which uses "list of strings".

Test: m bazel_overlay && bazel query //...  --package_path=out/soong/bazel_overlay

[1]: 764a771917%5E%21/#F1

Change-Id: I7522d15b1ce751807e1881ce1e94f068d226b316
2020-11-05 03:55:20 -05:00
Jingwen Chen
70b7eeed1c Move hardcoded bazel flags from soong_ui to common.bazelrc.
Test: USE_BAZEL=1 m
Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: Ib675dba8bfaf615bf3752a4bb4531b818526f267
2020-11-05 03:31:28 -05:00
Chris Parsons
c09495bf96 After bazel execution, symlink results in out/
This ensures that USE_BAZEL=1 mode has the same directory structure
under out/ as it does without USE_BAZEL=1.

Test: Manually verified building USE_BAZEL=1 aosp_flame with droid and
libc

Change-Id: I27e810772d1bf04bd7930ea122217b93d2fd48b4
2020-11-04 20:56:14 -05:00
Patrice Arruda
ca221f3e6d Collect useful resource information of each executed process in soong_ui.
Collect the resource information of each executed process in soong_ui
for metrics analysis.

Bug: b/169453825
Test: m nothing; "lunch 1" && m
Change-Id: I8c7fe019111921c4c59174d133b85439ec825885
2020-11-04 23:35:43 +00:00
Artur Satayev
ed667a8345 Add PHONY for apex-allowed-deps check.
Bug: 149622332
Test: m apex-allowed-deps-check
Change-Id: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
Merged-In: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
(cherry picked from commit 01aa11e833)
2020-11-04 20:50:03 +00:00
Nikita Ioffe
3b834bf347 Update apex/allowed_deps.txt
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: Iad138bdb439e3ebc7a145dec7875b8bb5756d755
2020-11-04 17:12:27 +00:00
Martin Stjernholm
af3bf0dd5d Merge "Move hardcoded apex_available's for ART modules into ART blueprints." 2020-11-04 16:28:26 +00:00
Jingwen Chen
ebb0b574c8 Add dependency on dexpreopt.config to soong_build doc generation.
This was caught while running the soong_build docs action under Bazel as
ninja executor. Since the config file is not an explicit input to the
action, it's not present in Bazel's execution root during action
execution time, leading to a missing file error. To fix it, add the file
as an input to the action, if it's configured in product variables.

New soong_build statement:

build out/soong/docs/soong_build.html: s.writedocs.soongDocs $
        out/.module_paths/Android.bp.list out/soong/soong.variables $
        out/soong/dexpreopt.config | out/soong/.bootstrap/bin/soong_build
    outDir = out/soong/docs

Test: m
Test: USE_BAZEL=1 m
Bug: 161958189
Fixes: 161958189
Change-Id: I2bf264e848bb29ac91f4196fbe9c4ecf3cea8a2c
2020-11-04 01:51:40 -05:00
Treehugger Robot
37f5a8fb86 Merge "Always generate profiling debug info" 2020-11-04 02:58:02 +00:00
Nikita Ioffe
e546621f3a Merge changes Ifd056230,I97f26b78,I19d58582
* changes:
  Add new neuralnetworks targets to apex/allowed_deps.txt
  Update VNDK version for common graphics HALs.
  Manually update apex/allowed_deps.txt
2020-11-03 20:38:21 +00:00
Anton Hansson
e5b1bd4c72 Merge "Make genrules uninstallable ETC instead of PHONY" 2020-11-03 19:23:00 +00:00
Yi Kong
110cd5fe7f Always generate profiling debug info
The additional debug info is used for sampling PGO. This does not affect
the size of final stripped binaries.

Also removed `-gmlt` flag in pgo.go, since it's actually a lower level
of debug option than the default (-g).

Test: build, verify final binaries are identical size
Bug: 79161490
Change-Id: Ie4cf4998695f78a50a7ac7a7a0853c625cbd8880
2020-11-03 18:13:21 +00:00
Slava Shklyaev
af7e511921 Add new neuralnetworks targets to apex/allowed_deps.txt
Generated with build/soong/scripts/update-apex-allowed-deps.sh

Bug: 160669906
Test: m
Change-Id: Ifd056230dd352fe3fa1c462d1e090aef5bbeb09d
Merged-In: Ifd056230dd352fe3fa1c462d1e090aef5bbeb09d
(cherry picked from commit 7f0c05539f)
2020-11-03 17:40:01 +00:00
Steven Moreland
9efbd038a7 Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I97f26b78758f2eed128fc46db03b5f6ba3f2245f
Merged-In: I97f26b78758f2eed128fc46db03b5f6ba3f2245f
(cherry picked from commit 25281087a9)
2020-11-03 17:35:43 +00:00
Nikita Ioffe
f9b945196b Manually update apex/allowed_deps.txt
This is one in a series of cls to make sure that
build/soong/scripts/update-apex-allowed-deps.sh is a no-op on cleanly
checked out aosp/master.

This cl is an intersection of the following:
ag/I9f98361aa248b82cb58527a5cd59e6d17c3e8723,
ag/I19ba5900ddff84948cfa29e48e31cd609e61dbdb,
build/soon/apex/allowed_deps.txt in aosp/master

Test: presubmit
Merged-In: I9f98361aa248b82cb58527a5cd59e6d17c3e8723
Change-Id: I19d58582de85e1ae1ef1c2b997d568235ca17710
2020-11-03 17:30:31 +00:00
Treehugger Robot
5f99726550 Merge "Allow comments from linker.config.json" 2020-11-03 12:46:50 +00:00
Anton Hansson
72f1849c71 Make genrules uninstallable ETC instead of PHONY
Makes it possible for make modules to depend on genrules via
constructs like $(call intermediates-dir-for,ETC,foo)/foo.

Test: presubmit
Change-Id: Ic9a014f55ea503f1c0c8167f351ecd1407083562
2020-11-03 12:34:18 +00:00
Kiyoung Kim
e52c665d7f Allow comments from linker.config.json
Filter out lines starts with "//" from json file to allow simple
comments on the contents. Original json format does not support
comments, but this reduces readability compared to txt file or other
formats. This change allows simple comments on the linker.config.json to
give more information on the contents.

Test: parse succeeded with commented contents
Change-Id: I1c734bf9a054f81f57aa2aea1038d0041297acf1
2020-11-03 16:00:23 +09:00
Jingwen Chen
366c7d3a74 Merge "Add ctx.ModuleDir and top level module dirs of input sources to JDK9 --patch-module lookup." 2020-11-03 04:56:13 +00:00
Jingwen Chen
5136a6e5aa Add ctx.ModuleDir and top level module dirs of input sources to JDK9
--patch-module lookup.

javac --patch-module accepts a list of directories and/or jars for JDK9
module patching (see bug for more details). In Bazel-Ninja execution,
Bazel executes the javac action in its own execution root working
directory, unlike Ninja, which works in the Android top level directory.
The Bazel execution root is formed of a symlink forest of top level
directories. This symlink forest is a problem for javac because it
doesn't traverse into symlinks.

To support Bazel executing these javac actions, we explicitly encode the
module directory, and the top level directory of any other source file
inputs into the --patch-module javac flag.

For example, the "core-all" libcore module compiles into `java.base`,
and depends on filegroups outside of `libcore` (`tools`). This CL adds
`tools` to the --patch-module lookup dir, on top of `libcore`.

See java_test.go for more details.

Bug: 150878007
Fixes: 150878007
Test: m
Test: bazel build droid (aosp_flame)
Change-Id: Id95b0a9a675fc75678f7b5e600344b4403f0c518
2020-11-02 17:49:57 -05:00
Treehugger Robot
d3e294d8ac Merge "Add --skip-soong-tests argument to soong_ui and use it in multiproduct_kati" 2020-11-02 21:31:31 +00:00
Treehugger Robot
20cf20ba1c Merge changes I0289d866,Ie7363524
* changes:
  Move stubs related methods out of LinkableInterface
  Don't create stubs variants of static libraries
2020-11-02 21:31:11 +00:00
Patrice Arruda
e83dea5aac Merge "Capture the build command that executed the build system." 2020-10-30 16:25:34 +00:00
Ulyana Trafimovich
9b567d555a Merge "Add unit tests for class loader context." 2020-10-30 10:47:37 +00:00
Ulyana Trafimovich
f1a2e55ac9 Merge "Add ModuleInstallPathContextForTesting." 2020-10-30 10:47:21 +00:00
Paul Duffin
1eacd95001 Merge "Move boot jars package check from make" 2020-10-30 10:06:46 +00:00
Jingwen Chen
9cb8d1b37b java compilation: refactor and extract javac flag computation into a
separate function.

This cleans up the internal wiring for a follow-up --patch-module
functionality change.

Bug: 150878007
Test: m
Change-Id: Ie7d9c2b1ad40e055da8a53d632510bef408fc7d2
2020-10-30 00:55:58 -04:00
Martin Stjernholm
377d752a6b Move hardcoded apex_available's for ART modules into ART blueprints.
Test: m droid
Bug: 133140750
Change-Id: I7280c7c61979d8f1aa3c849ff7079a5dd3ef216d
2020-10-30 02:17:23 +00:00
Zach Johnson
6e64c2fe65 Merge "Add system/bt to Rust allowed paths." 2020-10-29 23:20:30 +00:00
Nikita Ioffe
e3fbadcfee Merge "Update apex/allowed_deps.txt" 2020-10-29 21:46:54 +00:00
Colin Cross
00a8a3f746 Add --skip-soong-tests argument to soong_ui and use it in multiproduct_kati
There is no need for multiproduct_kati to run the tests for
every product, they don't vary by product config. --skip-soong-tests
can also be used for local development to run soong_build even if
the tests don't pass.

Bug: 156428456
Test: m --skip-soong-tests nothing
Change-Id: I9c00e3d1b6e51d17bb290339c3f124d4d1c9e69f
2020-10-29 14:22:04 -07:00
Colin Cross
31076b3185 Move stubs related methods out of LinkableInterface
The stubs methods are very specific to cc for now, move them out
of LinkableInterface so they are not shared with rust.  Instead,
create a cc.Module.library field that contains the libraryInterface
to simplify calling libraryInterface methods on cc modules.

Test: all Soong tests
Test: no change to Soong outputs
Change-Id: I0289d866ce1f7a765631fe3101a62b1b4988ba1c
2020-10-29 14:17:54 -07:00
Colin Cross
a717db7304 Don't create stubs variants of static libraries
Statically linking stub implementations doesn't make sense, don't
create stubs variants of static libraries.

Bug: 170784825
Test: all soong tests
Change-Id: Ie73635244516edf6da884e3a7a275971a9bd7839
2020-10-29 14:17:37 -07:00
Martin Stjernholm
3a456b606e Merge "Disable sanitizer flags and output files for sanitizer-enabled SDK members." 2020-10-29 20:12:25 +00:00
Qasim Javed
d271ada0c9 Add system/bt to Rust allowed paths.
Test: m nothing

Change-Id: Ie467a622dfdb8aea94a06f5fe20183dc9d149254
2020-10-29 11:18:08 -07:00
Patrice Arruda
e92c30dff1 Capture the build command that executed the build system.
We need to capture the user build command to understand what additional
arguments is passed in to Soong. This data is useful to know which
targets are being executed and have statistics on top build targets
are specified.

Bug: b/169453712
Test: ran "m blueprint_tools", "m nothing", "lunch 1" and checked
      in soong_metrics proto.
Change-Id: I7ab94dcf037211f1abffe6afd012b03ffbf99756
2020-10-29 11:01:32 -07:00
Ulyana Trafimovich
42cac12541 Merge "Drop "android.hidl.manager" -> "android.hidl.base" dependency from class loader context." 2020-10-29 17:51:48 +00:00
Ulyana Trafimovich
810025466f Merge "Move class loader context definitions to a separate file." 2020-10-29 17:51:24 +00:00
Ulya Trafimovich
6961267298 Add unit tests for class loader context.
Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I96a1e6cef86652e429b1678a655fc0b02f40d00c
2020-10-29 17:47:34 +00:00
Ulya Trafimovich
ccc8c85a7c Add ModuleInstallPathContextForTesting.
Test: m nothing
Change-Id: Ibcd6016cc43300fcc7f0ec511a3159886d0fdc7d
2020-10-29 17:47:34 +00:00
Ulya Trafimovich
180fecedf0 Drop "android.hidl.manager" -> "android.hidl.base" dependency from class loader context.
This dependency is incorrect and shouldn't exist.
It has been removed in https://r.android.com/1467918

Test: m nothing
Bug: 170710203
Bug: 132357300
Change-Id: If3036437e138b552436f135425e6bd15be043678
2020-10-29 17:47:34 +00:00
Ulya Trafimovich
eb26886c85 Move class loader context definitions to a separate file.
Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I1e7e9db1654d0b835276be1cfa6a8eeffc5e96ee
2020-10-29 17:47:34 +00:00