Commit Graph

5523 Commits

Author SHA1 Message Date
Colin Cross b69301ee96 Sort compiled resources by output path
Soong was keeping the compiled resources in the same order as the
input resources, which are sorted lexicographically. Converting the
path names in pathsToAapt2Paths results in a list that is no longer
lexicographically sorted.

Make sorts the inputs to aapt2 link by compiled resource name, so
do the same in Soong.

Bug: 69917341
Test: no change to framework-res.apk when converting to Soong
Change-Id: I29e8339b9969b0d323d469dac140c7e172b7ebfa
2017-12-01 19:16:42 +00:00
Colin Cross b76a63e054 Split up testJavaWithEnvFs
am: 527012af07

Change-Id: I62d073c9c3810865bc1a24f142319180ae85a96d
2017-12-01 16:32:29 +00:00
Colin Cross 890ff551f7 Add enforced RRO support to Soong
Ignore overlay directories that have been selected for enforced RRO
by the product, and pass them to Make instead to be converted to
an auto generated RRO package.

Bug: 69917341
Test: m checkbuild
Change-Id: I8e2677f4c600acdd8dee0869bf4fbc3d5dbc8b44
2017-12-01 16:12:51 +00:00
Colin Cross 527012af07 Split up testJavaWithEnvFs
Instead of passing all the options to testJavaWithEnvFs, split it
up into testConfig, testContext, and run.  Tests that don't need
any special options can continue to use testJava, more complicated
tests can call the three functions manually.  This gives more
flexibility in complicated tests for the next patch.

Test: soong java tests
Change-Id: Ifd5dcb40cf08e4cbf69bf8e02c5698adbfbcdcb3
2017-12-01 16:12:03 +00:00
Nan Zhang 6625526e85 Merge "Revert "Change Python in Soong to support device side build.""
am: 6ff00ed273

Change-Id: I36eb5ec0a903cd748647820a1d7fcaacffbc322e
2017-12-01 06:30:40 +00:00
Nan Zhang 6ff00ed273 Merge "Revert "Change Python in Soong to support device side build."" 2017-12-01 06:26:40 +00:00
Nan Zhang 0a32e5936b Revert "Change Python in Soong to support device side build."
This reverts commit 3bba05962d.

Reason for revert: <revert mac builds>

Change-Id: I25f1380573d69f7e111287624a2d4a3d95fdd86b
2017-12-01 06:19:27 +00:00
Sundong Ahn ccb9e107a8 Merge "Add system_$(VER)"
am: 9c9540d008

Change-Id: I39e3a4ac7c47d918b52f0a4bd22a7c03009cf8a1
2017-12-01 04:25:34 +00:00
Treehugger Robot 9c9540d008 Merge "Add system_$(VER)" 2017-12-01 04:19:45 +00:00
Dan Willemsen 1ef719f19c Merge "Add base variables for windows clang"
am: d0704cf7fa

Change-Id: I37d1e0b151976f44d942a994b9335d6e75917362
2017-12-01 02:58:21 +00:00
Treehugger Robot d0704cf7fa Merge "Add base variables for windows clang" 2017-12-01 02:52:27 +00:00
Nan Zhang 6a505f65ad Merge "Change Python in Soong to support device side build."
am: 6825c25d6e

Change-Id: I01adcfec4515cba43cd24cb96e6a3110250981b5
2017-12-01 02:28:21 +00:00
Treehugger Robot 6825c25d6e Merge "Change Python in Soong to support device side build." 2017-12-01 02:22:56 +00:00
Sundong Ahn 0926fae350 Add system_$(VER)
The system_$(VER) is added for vendor, similar to sdk.

Bug: 67724799
Test: build
Merged-In: I2545c92707591ca278066870c74e9f49e9825855
Change-Id: I2545c92707591ca278066870c74e9f49e9825855
(cherry picked from commit b8baff1fa3)
2017-12-01 00:41:59 +00:00
Dan Willemsen 01f388c343 Add base variables for windows clang
This just copies most of what exists for clang on Linux, but doesn't
actually turn on clang support.

Bug: 69933068
Test: m nothing; compare ninja files
Change-Id: I2cf203026e7ced32004a91d7f3baf4a6415085eb
2017-11-30 15:42:53 -08:00
Nan Zhang 3bba05962d Change Python in Soong to support device side build.
Add python_test to generate executables for both host and device side.
And change python_library_host to python_library.

installation for python device test will be under
target/product/generic_arm[64]/data/nativetest[64].

Bug: b/69114465
Test: m clean && m -j
Device Test:
adb root; adb push nan_devicetest /data;
adb shell; ./nan_devicetest
print(sys.path)
['/data/nan_devicetest/runfiles', '/data/nan_devicetest', '/data/nan_devicetest/internal', '/data/nan_devicetest/internal/stdlib']

Change-Id: If8317070a3aa1b6dab2e84b8df2d037f495d7247
2017-11-30 13:55:49 -08:00
Colin Cross 2fc6f692d1 Merge "Allow building framework.jar and framework-res.apk"
am: 85c87cef01

Change-Id: I9e461fe98f4609b0286747a9f87939af78a7039a
2017-11-30 20:42:27 +00:00
Colin Cross 85c87cef01 Merge "Allow building framework.jar and framework-res.apk" 2017-11-30 20:38:15 +00:00
Dan Willemsen 3f5e5a3714 Expose $(prefix)CLANG_SUPPORTED to make
am: 7b6d9b956d

Change-Id: I500e3d7aa8765a85c7edd2da320885a032f851c3
2017-11-30 08:11:19 +00:00
Dan Willemsen 7b6d9b956d Expose $(prefix)CLANG_SUPPORTED to make
So that we can switch clang on and off for windows from just Soong.

Bug: 69933068
Test: grep CLANG_SUPPORTED out/soong/make_vars-aosp_arm.mk
Change-Id: Ic304c1138ee2302c5733ef465bd462a0a25e949f
2017-11-30 05:08:32 +00:00
Colin Cross 5ab4e6d817 Allow building framework.jar and framework-res.apk
Update app support enough to build framework-res.apk, link
framework.jar against its generated files, and export it to
make.

Bug: 69917341
Test: m checkbuild tests docs
Change-Id: I7db29cd1f5fabb22e844483ecc7c38abfedbbe0a
2017-11-29 20:47:42 -08:00
Colin Cross b3280409fd Merge changes Ic88be643,Ibe21efde
am: 46029a4131

Change-Id: I53d8eefa3f818ce1979f19fbe01f8523b045fb3c
2017-11-30 02:32:02 +00:00
Treehugger Robot 46029a4131 Merge changes Ic88be643,Ibe21efde
* changes:
  Replace ModuleContext.AConfig() with Config()
  Make *Context.Config return a Config instead of a interface{}
2017-11-30 02:21:30 +00:00
Chih-Hung Hsieh 9741b57ad8 Merge "Reduce WarningAllowedProjects."
am: c92168f08d

Change-Id: I9220f79e14be9a3445445e35d985c66ede128d87
2017-11-30 00:53:32 +00:00
Jeff Gaston dd5e9980ce Revert "Soong support for namespaces"
am: 178d5fefc0

Change-Id: Ib1d57b0d7d9f914d24c3f6fbef91d8d02821b65f
2017-11-30 00:53:02 +00:00
Colin Cross eb2f0d255e Convert a missed Singleton
am: 54855ddca4

Change-Id: I3dc101f9a5ffdfb1d0994ff0f4f3b08693cb8b17
2017-11-30 00:52:43 +00:00
Colin Cross 044c46b1d5 Fix aapt2
am: 44f066895d

Change-Id: I1aa3790a982d2ea64e66debf372096468236be63
2017-11-30 00:52:23 +00:00
Treehugger Robot c92168f08d Merge "Reduce WarningAllowedProjects." 2017-11-30 00:44:57 +00:00
Colin Cross 6510f91a1c Replace ModuleContext.AConfig() with Config()
AConfig() now duplicates Config().  Replace the uses of AConfig()
with Config().  Leave AConfig() for now until code in other
projects is cleaned up.

Test: m checkbuild
Change-Id: Ic88be643049d21dba45dbd1a65588ed94bf43bdc
2017-11-30 00:44:18 +00:00
Colin Cross aabf67968c Make *Context.Config return a Config instead of a interface{}
In Soong, a Config() method will always return a Config.  Make
ModuleContext, SingletonContext, TopDownMutatorContext and
BottomUpMutatorContext's Config() methods explictly return
a Config to avoid having to type-assert everywhere.  Overriding
the Config method requires duplicating the list of methods in
blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext,
following the same pattern used by the other *Contexts.

Config() obsoletes the AConfig() method used in some places, which
will be cleaned up in the next patch.

Test: m checkbuild
Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
2017-11-30 00:44:11 +00:00
Jeff Gaston 178d5fefc0 Revert "Soong support for namespaces"
This reverts commit 63a250a336.

Reason for revert: Some failures:
  namespace_test.go:648: dir1/Blueprints:2:4: a namespace must be the first module in the file 
  such as New Build Breakage: aosp-master/build_test @ 4475274

Change-Id: I1b5db8eb934e51ff22241bfca44199d886b1393b
2017-11-30 00:43:43 +00:00
Colin Cross 54855ddca4 Convert a missed Singleton
Convert EnvSingleton to android.SingletonFactory.

Test: m checkbuild
Change-Id: Ia18b0b97718ba7c08d3f136f6f4096477d90c0f4
2017-11-30 00:42:49 +00:00
Colin Cross 44f066895d Fix aapt2
Fix some ninja variable issues in the aapt2 rules.  These were
caught by app_test.go, but that wasn't being run automatically,
so add it to testSrcs.

Test: app_test.go
Change-Id: Ia01dda45ba5ced9c304056939c0e69f170c15de3
2017-11-30 00:40:38 +00:00
Jeff Gaston 8f4be880b0 Merge "Soong support for namespaces"
am: a8063afc16

Change-Id: I98394fcd7f19b3e64c06527212056660d94eb670
2017-11-29 23:10:51 +00:00
Jeff Gaston a8063afc16 Merge "Soong support for namespaces" 2017-11-29 23:01:39 +00:00
Chih-Hung Hsieh 0082636a14 Reduce WarningAllowedProjects.
* Warnings were fixed or suppressed in these projects.

Test: normal build
Change-Id: I5eec81704472c1675adf5fa784112c025f3c0222
2017-11-29 13:52:26 -08:00
Colin Cross 2293f412e9 Merge "Revert "Revert "Test for dangling rules in make checkbuild"""
am: b8160761f7

Change-Id: Icd96a71c16017fe8875c2e1fdac7c937f5ad8f97
2017-11-29 21:21:10 +00:00
Treehugger Robot b8160761f7 Merge "Revert "Revert "Test for dangling rules in make checkbuild""" 2017-11-29 21:09:48 +00:00
Jeff Gaston 63a250a336 Soong support for namespaces
Bug: 65683273
Test: build/soong/scripts/diff_build_graphs.sh \
      --products=aosp_arm \
      'build/blueprint:work^ build/soong:work^' \
      'build/blueprint:work build/soong:work'
      # and see that the only changes were:
      # 1. adding some new files
      # 2. changing some line numbers
Test: m -j nothing # which runs unit tests

Change-Id: I6d3e52ef62c4cabe85b9a135a54de0e1a6aab29c
2017-11-29 13:03:40 -08:00
Jeff Gaston e840be1bbc Merge "Have androidmk ignore all-makefiles-under"
am: f94700b563

Change-Id: Id0100a20aa8d33012f2a61d1544619ca0d37df82
2017-11-29 21:01:39 +00:00
Jeff Gaston 0c573d383d Have diff_build_graphs.sh print the number of lines in the diff
Bug: b/69133815
Test: build/soong/diff_build_graphs.sh \
      'build/soong:work^' 'build/soong:work'

Change-Id: Iaeb66ba53e1b3d7ddd4b4551b3ac29b12ce227c5
2017-11-29 12:54:43 -08:00
Treehugger Robot f94700b563 Merge "Have androidmk ignore all-makefiles-under" 2017-11-29 20:53:38 +00:00
Jeff Gaston aa2476bd42 Merge "Sort cfi static libs to make them consistent"
am: 5313911912

Change-Id: Ifa11246b0a9203ba785a4d4c6614d93cc23b8643
2017-11-29 20:10:05 +00:00
Jeff Gaston 5313911912 Merge "Sort cfi static libs to make them consistent" 2017-11-29 19:58:38 +00:00
Dan Shi d3d2160907 Merge "Add TEST_MAPPING to finder's cache"
am: 8763169bdb

Change-Id: Ibf48f4660c2cd6a38c1434e142df17e922906d9f
2017-11-29 19:35:01 +00:00
Treehugger Robot 8763169bdb Merge "Add TEST_MAPPING to finder's cache" 2017-11-29 19:16:50 +00:00
Colin Cross 59e3bc2596 Replace aapt support with aapt2
am: 3bc7ffa59b

Change-Id: I9d7420a12e617ecd8dc77811a956f99ac7f19b2d
2017-11-29 05:18:09 +00:00
Colin Cross a0a0b7fd90 Wrap PackageContext and SingletonContext
am: 0875c52de7

Change-Id: Ibffbf49a34a1ca042cc21f79f8aacfe62695e87e
2017-11-29 05:18:07 +00:00
Colin Cross 3bc7ffa59b Replace aapt support with aapt2
Use aapt2 instead of aapt to compile Android app resources.
Also generate all files into srcjars instead of individual
sources.

Test: m checkbuild
Change-Id: I5a67991a0daf0017e8159b46fcff7d5564a91468
2017-11-29 05:05:07 +00:00
Colin Cross 0875c52de7 Wrap PackageContext and SingletonContext
Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}.  The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.

SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does.  This requires
updating every Singleton to use the android-specific methods.

Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
2017-11-29 05:04:30 +00:00