Commit Graph

1514 Commits

Author SHA1 Message Date
Automerger Merge Worker
c4e6501ed7 Merge "Fix dependencies through symlinks" am: d66b2fd3cf am: eb5078f0a6 am: ba480acb30
Change-Id: Ia0b3657e59975f230e7478cf206a5259931f4f68
2020-01-17 00:21:35 +00:00
Treehugger Robot
d66b2fd3cf Merge "Fix dependencies through symlinks" 2020-01-16 23:21:25 +00:00
Automerger Merge Worker
4c167ae85d Merge "Save compilation units in protobuf format." am: 1be2d48005 am: e0703cdd88 am: 0a5b3ff2b7
Change-Id: I1d9d4c999b72443c36f992050987962a55cb4056
2020-01-16 19:27:17 +00:00
Treehugger Robot
1be2d48005 Merge "Save compilation units in protobuf format." 2020-01-16 18:55:26 +00:00
Dan Willemsen
40efa1cd31 Fix dependencies through symlinks
Now that ninja uses lstat so that we can get the mtime of the symlink
itself, it's safe to use a real input here rather than an order only
input. This matches how our other install rules work for host files.
Symlinks should be quick to recreate, so I'm not copying the logic to do
order-only dependencies for the device.

Bug: 128577186
Bug: 145278193
Bug: 135515543
Test: m out/target/product/walleye/apex/com.android.art.debug/javalib/arm/boot.art
      rm out/soong/host/linux-x86/bin/dex2oatd64
      m out/target/product/walleye/apex/com.android.art.debug/javalib/arm/boot.art

Change-Id: Ief5ec752ce0d0216aeecd8e904afc59f3f08ed7d
2020-01-16 17:13:35 +00:00
Anton Hansson
eec79ebe03 Default apex_available to //apex_available:platform
This means everything that goes into apexes need to be
explicitly labeled to be available for apex.

Whitelist the current offenders. This list should be
trimmed down.

Bug: 147364041
Test: m
Test: multiproduct_kati -only-soong
Exempt-From-Owner-Approval: cherry-pick from internal
Change-Id: I837299c6a15d46f8a5ba544b613776b1cc27d7b8
Merged-In: I837299c6a15d46f8a5ba544b613776b1cc27d7b8
(cherry picked from commit 93488cbb10d4882845abb732f8e53714f0982031)
2020-01-16 09:14:03 +00:00
Anton Hansson
0fdb01dc7d Merge "Default apex_available to //apex_available:platform" 2020-01-16 08:10:35 +00:00
Anton Hansson
5053c293ab Default apex_available to //apex_available:platform
This means everything that goes into apexes need to be
explicitly labeled to be available for apex.

Whitelist the current offenders. This list should be
trimmed down.

Bug: 147364041
Test: m
Test: multiproduct_kati -only-soong
Exempt-From-Owner-Approval: Just added more whitelist entries
Change-Id: I837299c6a15d46f8a5ba544b613776b1cc27d7b8
2020-01-16 08:07:16 +00:00
Automerger Merge Worker
d84989724b Merge changes I0668ff5a,Iff2d7063,I6f8b1e2d,I126db49d,Ic6582260 am: a35294889f am: 273045701d am: 2e84d4d4ea
Change-Id: I169c252ec78ad9846b86673bcfbc3eda08059552
2020-01-16 02:33:21 +00:00
Sasha Smundak
6c2d4f91f8 Save compilation units in protobuf format.
Bug: 146224091
Test: manual
Change-Id: I7a856bab13f54c78efa0061421c3fcb9341bc6e7
2020-01-15 12:40:03 -08:00
Paul Duffin
78ac5b962e Exclude source->prebuilt deps from visibility enforcement
When both prebuilt and source versions of a module are present in the
build an implicit dependency is added from source -> prebuilt. This
change excludes that dependency from visibility enforcement as it
provides no value and would otherwise require an sdk snapshot to
rewrite the visibility of the generated prebuilt modules which would
be complicated.

The rewriting would include:
* Detecting //visibility:public and just passing that straight through.
* Detecting //visibility:private and replacing that with the location
  of the source.
* Otherwise, adding the location of the source to the visibility
  property.

This adds a general mechanism to allow any dependency to be excluded
from visibility enforcement by simply using a tag that implements
the ExcludeFromVisibilityEnforcementTag interface.

Bug: 142940300
Test: m nothing
Change-Id: I0668ff5aa798152d17faf3aac1bb8eff8d6350c3
2020-01-15 11:17:57 +00:00
Paul Duffin
c132742c96 Dedup package build components registration
Bug: 146540677
Test: m nothing
Change-Id: Iff2d7063b7f06313e9068c61a5627229463c98dd
2020-01-15 11:17:57 +00:00
Paul Duffin
a80ef84652 Support registering hard coded pre arch mutators
Some pre arch mutators are hard coded into mutator.go and so could not
share code for registering those mutators between tests and runtime.
This change adds a new HardCodedPreArchMutators(RegisterMutatorFunc)
method to RegistrationContext which allows hard coded mutators to be
registered alongside other build components during init() and testing.

The method is treated as a noop on the InitRegistrationContext and
behaves just like the PreArchMutators(RegisterMutatorFunc) method on
the TestingContext.

Bug: 146540677
Test: m nothing
Change-Id: I6f8b1e2d54d9dc4e86f951ced61d1ee7b0fe4b2e
2020-01-15 11:17:57 +00:00
Automerger Merge Worker
889f0a3d41 Merge "Sandbox soong_build by changing to root directory" am: ae7cddd5ad am: 70eefb570a am: 9280bf9474
Change-Id: I7d749bf12f039ca72bd59f4264082043f1f14fde
2020-01-11 07:34:02 +00:00
Treehugger Robot
ae7cddd5ad Merge "Sandbox soong_build by changing to root directory" 2020-01-11 06:00:21 +00:00
Colin Cross
988414c2cf Sandbox soong_build by changing to root directory
This relands I12a0f907753fefd1997ab8b4ea2ac331234093cf along with
a fix to blueprint for absolute paths.

Store the current working directory and then change to the root
directory so that all file accesses must go through helpers in
the android package that properly track dependencies.

Change-Id: I24ac485677aa102eec1a2521d16820da6ee1ae77
Fixes: 146437378
Test: m checkbuild
Test: m OUT_DIR=/tmp/out nothing
2020-01-11 01:11:46 +00:00
Automerger Merge Worker
aae3ee0e7b Merge "Rename OverridableModuleBase.properties." am: 5fa3a1f743 am: 1e38e20682 am: ff367b69af
Change-Id: Ie8d88ed7ae467332973603fa70f70e4ce53e3212
2020-01-11 00:33:05 +00:00
Treehugger Robot
5fa3a1f743 Merge "Rename OverridableModuleBase.properties." 2020-01-10 23:59:34 +00:00
Automerger Merge Worker
8c02671d51 Merge "Revert "Sandbox soong_build by changing to root directory"" am: e734832d25 am: 408fab4d25 am: f84fe5fbd4
Change-Id: Iac451a70c28566f8413b2495e8ae8a24b80e2a2f
2020-01-10 22:31:07 +00:00
Jaewoong Jung
b64dd002b3 Rename OverridableModuleBase.properties.
The generic name causes confusion, even to the IDE.

Test: TreeHugger
Change-Id: I0cb4959ab41b4732e7ee7a5d1d818ef771674023
2020-01-10 13:26:00 -08:00
Colin Cross
13e8cb9b4c Merge "Sandbox soong_build by changing to root directory" am: e35e961aa9 am: 856eff7fde
am: a2040fc892

Change-Id: I31d8b52f57f685bc69aab817d9b4eebcafaf78df
2020-01-10 11:14:39 -08:00
Colin Cross
47e4f9e1e8 Revert "Sandbox soong_build by changing to root directory"
This reverts commit 05c25ccb4a.

Reason for revert: broke absolute OUT_DIR
Bug: 146437378

Change-Id: I523ed79d40e1c1ef040212ba794a7a084abea75d
2020-01-10 18:51:04 +00:00
Colin Cross
05c25ccb4a Sandbox soong_build by changing to root directory
Store the current working directory and then change to the root
directory so that all file accesses must go through helpers in
the android package that properly track dependencies.

Fixes: 146437378
Test: m checkbuild
Change-Id: I12a0f907753fefd1997ab8b4ea2ac331234093cf
2020-01-09 14:19:46 -08:00
Automerger Merge Worker
3ef119a178 *RequiredModuleNames functions are available via Module interface am: 6a8cf5fab4 am: 3d0ec3d20b am: 823160f504
Change-Id: I98c13a488854428f5a2cf1e6210410ccde9719d8
2020-01-07 04:31:19 +00:00
Jiyong Park
3d0ec3d20b *RequiredModuleNames functions are available via Module interface
am: 6a8cf5fab4

Change-Id: Ia3aa6bd2780f7770c2798c6ff95f0e826b1ea165
2020-01-06 20:08:05 -08:00
Treehugger Robot
64d5ccef7a Merge changes from topic "carry_required"
* changes:
  APEX carries required properties of its dependencies
  *RequiredModuleNames functions are available via Module interface
2020-01-07 03:51:29 +00:00
Automerger Merge Worker
98995e40af Merge changes from topic "blueprint_scoped_module_factories" am: e35ff4aeb3 am: d6f80608ae am: 42988b2d48
Change-Id: Ia94d355adbbd8bdc996bbcc75ca64edcf6f30dd2
2020-01-06 23:23:39 +00:00
Automerger Merge Worker
8eb2ff8de9 Use blueprint.EarlyModuleContext am: c34d2329b4 am: a5b7784ba6 am: fd259c494d
Change-Id: I0d3449962777a19554670004fd371258c14f0946
2020-01-06 23:23:36 +00:00
Automerger Merge Worker
f0c7bfa196 Merge "Add EarlyModuleContext for LoadHookContext" am: 7d20c4407c am: ea83ab5ecc am: b089fba01f
Change-Id: I12a8830989cfec3adf7bc6d8bd3af558992d284c
2020-01-06 22:27:19 +00:00
Colin Cross
31a738bda0 Use blueprint's load hooks
Make android.AddLoadHook wrap blueprint.AddLoadHook.  Also pass
the config object to ParseBlueprintsFiles.

Test: all soong tests
Change-Id: I60c988b717d395f52498ec23ef7c9046d9861a6e
2020-01-06 10:57:26 -08:00
Colin Cross
c34d2329b4 Use blueprint.EarlyModuleContext
Make android.EarlyModuleContext wrap blueprint.EarlyModuleContext

Test: m checkbuild
Change-Id: I5e05c4f3dfb177811bc244a5cc2d71f42e47613b
2020-01-06 10:57:24 -08:00
Jiyong Park
6a8cf5fab4 *RequiredModuleNames functions are available via Module interface
...so that the required module names can be known to other modules

Bug: N/A
Test: m
Change-Id: Ib032b51c4ea4fd77bdebcf09b2d1c2aec1c8eb27
2020-01-06 10:35:58 +09:00
Colin Cross
1184b647d5 Add EarlyModuleContext for LoadHookContext
Make LoadHookContext embed a new EarlyModuleContext instead of
BaseModuleContext to reduce its API surface in preparation for
moving it to run during parsing instead of mutators.

Test: m checkbuild
Change-Id: I1cd3ff3b636e7e24991a9184d7521903473e505a
2020-01-04 08:40:55 -08:00
Automerger Merge Worker
095a175875 Merge "Delete arch hooks" am: c481607536 am: 464900022d am: 1fe3d15392
Change-Id: Ia2256d4d39ca6a5edd9dd553eb5f9b21785b9a4b
2020-01-03 19:18:02 +00:00
Colin Cross
87f790c509 Delete arch hooks
They are not used anywhere.

Test: m checkbuild
Change-Id: Ice7d68b97ca894c0c4c9efc6dc55c0870a132b9c
2020-01-03 17:21:04 +00:00
Automerger Merge Worker
585928fc5d Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot am: e602918294 am: b39c226ff7 am: 5f7e9a061b
Change-Id: I1b7d00af424d786c1f166f7d93776ff65278899e
2019-12-31 20:33:16 +00:00
Paul Duffin
e602918294 Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot
By default SdkMemberTypes are only supported on module_exports module
type. Support for sdk module type has to be explicitly specified.

The java_header_libs, native_shared_libs and stubs_sources are
supported on sdk. The latter is required to provide the stubs source
for an API specified in java_header_libs as they should be kept in
sync.

Bug: 146341462
Test: m nothing
Change-Id: I19b9e60792780a797458d4a9e489506602b13144
2019-12-31 15:08:59 +00:00
Automerger Merge Worker
a3fb93c909 Merge "Create APEX variation only when needed" am: e9391f8bab am: b184044c23 am: 22bef659fe
Change-Id: I08ff3fed0c994b99b959434d00168400ac4704f1
2019-12-28 05:36:26 +00:00
Jiyong Park
3ff1699683 Create APEX variation only when needed
Create an APEX variation of a module only when it is either directly
included in an APEX or the dependency to the module demands that the
module should be included. For example, a non-static dependency to a
java library no longer creates an APEX variant of the library.

Bug: 146907857
Test: m (apex_test amended)
Test: cat out/soong/build.ninja | grep "Module:" | wc -l
reduced from 47132 to 45881

Change-Id: Icd79fb4b60668d852b9f018343b934b5e42a8eda
2019-12-27 14:11:47 +09:00
Automerger Merge Worker
986fe22e22 Merge "Generate .srcjar for prebuilt_stubs_sources" am: e2bc36f12c am: 954e23e3e0 am: a8d9e2ecdd
Change-Id: Ica5b34271f7c1e7854f4cc7847e653851552ef26
2019-12-23 14:02:03 +00:00
Paul Duffin
e2bc36f12c Merge "Generate .srcjar for prebuilt_stubs_sources" 2019-12-23 13:32:08 +00:00
Jiyong Park
d061df9ef3 android_*_stubs_current modules are moved to frameworks/base
The modules were moved from developement/build to frameworks/base.
In addition, they no longer uses 'sdk_version:"none"'. Reflect that
change here.

Bug: N/A
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I6f69f7cb64a6ed3c2032a116500436eabe562dca
(cherry picked from commit 12cc126760)
Change-Id: I6f69f7cb64a6ed3c2032a116500436eabe562dca
2019-12-22 17:20:27 +09:00
TreeHugger Robot
92178fd3b5 Merge "android_*_stubs_current modules are moved to frameworks/base" 2019-12-22 08:12:28 +00:00
Jiyong Park
12cc126760 android_*_stubs_current modules are moved to frameworks/base
The modules were moved from developement/build to frameworks/base.
In addition, they no longer uses 'sdk_version:"none"'. Reflect that
change here.

Bug: N/A
Test: m
Change-Id: I6f69f7cb64a6ed3c2032a116500436eabe562dca
2019-12-22 13:36:12 +09:00
Automerger Merge Worker
96b74db89c Merge "Create product variant for product partition" am: 727173ecca am: 31bfaff20f am: 0b9c91b0cf
Change-Id: I52c421066068f949a9fa60a7ab8857e7cf81751b
2019-12-21 01:30:12 +00:00
Treehugger Robot
727173ecca Merge "Create product variant for product partition" 2019-12-21 00:56:45 +00:00
Automerger Merge Worker
bd3f25f149 Merge "Make apex.overrides overridable by override_apex." am: dcee89cad6 am: e324318356 am: 6074e3c3bb
Change-Id: Iefbd24546a17e894d10a27399b6814571fbf4e47
2019-12-20 18:38:33 +00:00
Jaewoong Jung
dcee89cad6 Merge "Make apex.overrides overridable by override_apex." 2019-12-20 18:20:50 +00:00
Automerger Merge Worker
b60f9f23da Merge "Add script for building all target arch's needed in AML (Android Mainline) prebuilts." am: d732beed90 am: 822d8655e5 am: 6a6c3bc47e
Change-Id: I0b9d8ea7545d1719e69098312e072cf204f93fd1
2019-12-20 12:28:39 +00:00
Martin Stjernholm
d732beed90 Merge "Add script for building all target arch's needed in AML (Android Mainline) prebuilts." 2019-12-20 11:53:33 +00:00