Commit Graph

10595 Commits

Author SHA1 Message Date
Shalini Salomi Bodapati 4a0459dd03 Add AVX/AVX2 supported archs in build system
This patch adds new arch features avx2 and avx512 and
their supported archictectures for x86 and x86_64

Bug: 123376719
Test: m checkbuild

Change-Id: I3c079741815b39d7dbb4072e12ef7c9c2c15f5fe
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
2019-03-13 03:48:45 +00:00
Jaewoong Jung 12c02a63d0 Build doc improvements.
Bring property type strings to the start of property comments. This is
how source.android.com shows variables and paratemeters, and it is also
easier to read, especially when a comment ends with a code example.

Test: m soong_docs
Change-Id: Ic3e9db3a3711495998919ee95bbef6c7cb33b215
2019-03-12 13:31:11 -07:00
Patrice Arruda 66184450d5 Merge "Soong: Add documentation to sh_binary[_host] module." 2019-03-12 16:21:36 +00:00
Treehugger Robot 9dd4b38c40 Merge "Soong: Update documentation on prebuilt* modules." 2019-03-12 14:47:36 +00:00
Treehugger Robot 0d2c1d1e23 Merge "Change module type text to HTML in build docs." 2019-03-12 01:48:23 +00:00
Patrice Arruda 9e14b96f29 Soong: Update documentation on prebuilt* modules.
The prebuilt_etc_host is missing synopsis. Also, cleaned up the
synopsis of the remaining prebuilt* module to be clearer.

Bug: b/128337482
Test: Built the documentation and verified that the output is correct.
Change-Id: I64593970a44b548ac841de79aa0e4aa1699c6c9b
2019-03-11 16:14:07 -07:00
Jaewoong Jung 238be3807c Change module type text to HTML in build docs.
To add code format (<pre>...</pre>) support to module type texts.

Fixes: 124332708
Test: m soong_docs
Change-Id: Ibe9d3845a8f952fdef5007893d4af5836809ce1f
2019-03-11 14:35:41 -07:00
Patrice Arruda e103419483 Soong: Add documentation to sh_binary[_host] module.
Synopsis was missing to the sh_binary[_host] module.

Bug: b/128337482
Test: Ran m soong_docs and verified that sh_binary[_host] module
had a synopsis.

Change-Id: I0bb702ab2d8e4168664e7bba397e0e26af7f03ab
2019-03-11 14:26:47 -07:00
Sasha Smundak 177a1a589d Fix crash in mergeListProperties
The value of a property to be merged may be a reference to a variable.
When we first create an attribute for a makefile variable (e.g. we
create 'android_static_libs' from LOCAL_STATIC_ANDROID_LIBRARIES), we
set its type correctly. However, reparse in bpfix erases this
information, so by the time 'android_static_libs' attribute is to be
merged with 'static_libs', it has no type and merge occurs. It isn't
easy to fix properly, so just don't merge in such case, Soong will
complain and it will be fixed manually.

Fixes: 125519127
Test: unit tests in androidmk_test.go
Change-Id: Ic66d7ab686a2fdde987f32e2b204c72d9bf0d026
2019-03-11 10:11:17 -07:00
Andrei-Valentin Onea fdd1457fa6 Merge "Differentiate system and test apis in whitelist" 2019-03-08 16:22:11 +00:00
Colin Cross 1255a561e6 Fix ALLOW_MISSING_DEPENDENCIES=true builds
Don't error out immediately if a SourceDepTag dependency is missing
if ALLOW_MISSING_DEPENDENCIES=true is set.

Test: forrest on unbundled build
Change-Id: I9077013e09e3ad0e90ae5163b26aace5b263e63a
2019-03-07 21:43:10 +00:00
Treehugger Robot 38bfc16c18 Merge "dumpvars += BOARD_VNDK_VERSION" 2019-03-07 21:23:55 +00:00
Colin Cross 937664a50a Add test for ctx.ExpandSources
Test: TestExpandSources
Change-Id: Ib2168b00618a45b2a36c4b158c6c02c4727a960b
2019-03-07 18:36:46 +00:00
Colin Cross 27b922f53e Annotate paths and deprecate ExtractSource(s)Deps
Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.

Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
2019-03-07 18:36:35 +00:00
Colin Cross 1b48842a4b Add path properties mutator
Add a mutator pass after DepsMutator that visits every property
struct in every module looking for properties that have a tag
`android:"path"`, and automatically add a SourceDepTag dependency
on any module references (":module-name") found.  Uses a cache to
store the mapping of property struct type to locations of
properties with the tag.

Test: android/path_properties_test.go
Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742
2019-03-07 18:36:24 +00:00
Steven Moreland 0002028c09 dumpvars += BOARD_VNDK_VERSION
Dump variable in log to track remaining targets which don't set it.

Bug: 122954981
Test: $ grep VNDK out/soong.log
2019/03/07 09:22:04.235604 build/soong/ui/build/dumpvars.go:109: BOARD_VNDK_VERSION current

Change-Id: I34146c752a4bf0d799374bb93cc0d75b0f1b048c
2019-03-07 09:28:35 -08:00
Treehugger Robot 1361449710 Merge "Add neverallow rules for java_device_for_host" 2019-03-07 16:14:45 +00:00
Colin Cross c35c5f9824 Add neverallow rules for java_device_for_host
java_device_for_host and java_host_for_device should rarely be
used and could cause problems if used incorrectly, so restrict them
to only the necessary projects through a neverallow whitelist.

Bug: 117920228
Test: neverallow_test.go
Change-Id: I37dce489c2fb8bca71bd46dbabaaa514bf6f7eee
Merged-In: I37dce489c2fb8bca71bd46dbabaaa514bf6f7eee
2019-03-07 15:23:21 +00:00
Treehugger Robot e3ca7fd565 Merge "Do not "escape" newline if comment ends with ESC character." 2019-03-07 04:29:45 +00:00
Jooyung Han a61ff2cec3 cc_test: emit errors if there's duplicate in srcs
In general "srcs" property allows duplication in the list.
But when cc_test's "test_per_src" property is set "true",
there will be variants according to "srcs" list.
Therefore, it should fail if there is a duplicate entry
in srcs list.

Bug: 113629474
Test: mma
Change-Id: I543624459c30dd296494a3a80e28ce5503a3ea2f
2019-03-07 01:57:57 +00:00
Sasha Smundak e10952b442 Do not "escape" newline if comment ends with ESC character.
Fixes: 127521510
Test: manual
Change-Id: I88a8eb2ca94b8aa06e2682d2c14f9e74f5ada286
2019-03-06 16:46:23 -08:00
Peter Collingbourne bd19db0da6 Remove workarounds for old compiler versions.
LLVM r349610 was released, so these workarounds are no longer required.

Bug: 112907825
Change-Id: Ia6ba0034881f2ab657d8420df3047c21757c7d9b
2019-03-06 10:48:36 -08:00
Nicolas Geoffray 7aa5a56bbc Merge "Hardcode in dexopt the information that /system/product should be /product." 2019-03-06 17:57:36 +00:00
Treehugger Robot f14277fc3a Merge "Add checks for double_loadable dependencies" 2019-03-06 03:29:20 +00:00
Treehugger Robot e3ad4144db Merge "Add modules for converting java modules between host and device" 2019-03-06 03:26:44 +00:00
Jooyung Han a70f067899 Add checks for double_loadable dependencies
Vendor-available libs can be double-loaded if LLNDK libs depend
on them. Currently soong checks only 'direct' dependency bewteen
LLNDK and VNDK lib. With this change, soong checks if every dependencies
from LLNDK is also LLNDK or VNDK-SP or marked as 'double_loadable:true'.
This change causes many libs to be marked as 'double_loadable'.

Bug: 121280180
Test: m -j
Change-Id: Ibc1879b6fd465a3141520abe0150018c3051c0a7
2019-03-06 11:18:21 +09:00
Colin Cross 3d7c9827d5 Add modules for converting java modules between host and device
java_device_for_host and java_host_for_device allow treating a
device module as a host module and vice versa.  They will be useful
for converting layoutlib and robolectric to Soong, as these modules
run device java code on the host.

Bug: 117920228
Test: device_host_converter_test.go
Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
2019-03-05 23:09:45 +00:00
Jaewoong Jung b8ba8a5ee8 Fixe typos in androidmk.
Replace contitional with conditional.

Test: androidmk_test.go
Change-Id: Ic261701f4588b9b8b6d3560598831368c3422508
2019-03-05 22:29:58 +00:00
Nicolas Geoffray 2464ef4975 Hardcode in dexopt the information that /system/product should be /product.
On-device compilation will always see paths starting with /product. This CL
makes sure preopt does the same.

Test: m && check odex files
Bug: 126415372
Change-Id: I5764e7f22bffb97b7093f351d7b97bbe5fb1f2f1
2019-03-05 14:14:04 +00:00
Treehugger Robot 5d3e2b70b8 Merge "Add comment to api_packages property" 2019-03-05 10:31:22 +00:00
Inseob Kim f63c2fb897 Add comment to api_packages property
Bug: N/A
Test: N/A
Change-Id: I38791170993484cdae26edee9595a74802853176
2019-03-05 05:23:45 +00:00
Inseob Kim b3f22ca48b Add blueprint:mutated to sysprop properties
Because this flag is used internally by sysprop_library.

Bug: N/A
Test: m -j
Test: build cc_library with setting sysprop property and fail
Change-Id: I478889b8923f99407a067e5b9efee9322c3e5ae8
2019-03-05 03:45:41 +00:00
Colin Cross 762286723a Add dexpreopt_bootjars_test.go
Add a test that exercises the dexpreopt_bootjars.go singleton.

Test: dexpreopt_bootjars_test.go
Change-Id: I01d4f6e22f6ff7b809af043391d7b6209dcb8675
2019-03-05 03:17:51 +00:00
Colin Cross c28bb0b8f9 Move some java test setup later
Move ctx.Register() from testContext() to run() so that tests can
register more singletons before the env singleton is registered.
Any singletons registered after the env singleton will hit an error
if they attempt to read an environment variable.

Move setDexpreoptTestGlobalConfig from TestConfig to run() so that
a test can set their own custom config after TestConfig but before
run().

Test: All Soong tests
Change-Id: Iec47f4b7898736f583cbd6bd53e4d02a035f4fb2
2019-03-05 03:17:42 +00:00
Colin Cross baa676f671 Fix RuleBuilder.Restat
RuleBuilder.Restat wasn't being propagated to the rule.

Test: rule_builder_test.go
Change-Id: Ie64c8076692ea10a0c47ed5a8832e3f553bea0fc
2019-03-05 03:17:33 +00:00
Colin Cross 4c83e5ccd4 Support testing Rules in Modules and Rules and Builds in Singletons
Add support for TestingModule to return RuleParams for rules created
by the module.

Refactor TestingModule to use helpers, and use the helpers to
implement a similar TestingSingleton.

Use the new functionality to test RuleBuilder's module and singleton
rules.

Test: none
Change-Id: I8348c56ff5086d0c49401f5a00faf7c864e6b6f3
2019-03-05 03:17:26 +00:00
Colin Cross 87ecbfe107 Update manifest merger to use binary
Manifest merger is now a java_binary instead of a collection of jars,
it can use the single binary as the dependency.

Bug: 112607039
Test: m checkbuild
Change-Id: Iea6c97c99a3bb09952fed2b25437b644f4e863f8
2019-03-04 22:02:01 +00:00
Colin Cross 0b9f31fb08 Replace *Escape with *EscapeList
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings.  Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.

Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
2019-03-04 18:11:53 +00:00
Pirama Arumuga Nainar 7abf560cb0 Merge "Enable coverage universally if COVERAGE_PATHS includes "*"" 2019-03-04 16:31:51 +00:00
Mark Salyzyn f57bfee1d1 Merge "Add required: to debuggable" 2019-03-04 15:14:02 +00:00
Treehugger Robot 4be65809d7 Merge "Ignore missing prebuilt_apis of java_sdk_library" 2019-03-04 07:20:55 +00:00
Treehugger Robot cc5b384ea5 Merge "Build System: Collect native dependent information from cc.go." 2019-03-04 06:01:10 +00:00
Inseob Kim 38449af64f Ignore missing prebuilt_apis of java_sdk_library
Building java_sdk_library without defining prebuilt_apis has been
failing with weird error messages. So one have to touch empty txt files
and create prebuilt_apis module, even when the java_sdk_library is
brand-new and has no previous versions. This commit fixes it so that API
check against previous version is skipped, in the case of missing
prebuilt_apis.

Note that Current api txt files (placed under api/ directory) are still
needed (make update-api)

Bug: 126259114
Test: tries to build without touching empty api txt files.
Change-Id: I93630f4139cbf502621693ec315dc06c0d07d1c3
2019-03-04 10:56:53 +09:00
bralee 3f49f4d469 Build System: Collect native dependent information from cc.go.
Bug: 126957990
Test: 1. m aidegen
      2. $ANDROID_HOST_OUT/bin/aidegen-dev frameworks/native -v
      3. open out/soong/module_bp_java_deps.json
         check *.a and *.so files are added.

Change-Id: I82ba49d023621908f0be12abf529553aee45fa5b
2019-03-04 06:58:15 +08:00
Colin Cross 247e0cfaa4 Don't add static libs resources to implemenation jars
Static dependency resources will already be in the resources jar
and the implementation and resource jar, they shouldn't be in
the implementation jar.

Test: m checkbuild
Change-Id: I4d4dab1d2e55e92ba9a95a66b246c721b9bf6410
2019-03-03 11:34:47 -08:00
Julien Desprez afbddd8ddd Merge "Autogenerate some extra_options based on some build properties" 2019-03-02 00:44:54 +00:00
Pirama Arumuga Nainar 4e128282f2 Enable coverage universally if COVERAGE_PATHS includes "*"
http://b/116873221

This will be used in a target in the build server to build all native
code with coverage.

Test: 'm NATIVE_COVERAGE=true COVERAGE_PATHS=* nothing' works as
expected.

Change-Id: I55d644ed9212c4ab0f1e4a00aac3a467fcf2a463
2019-03-01 16:17:53 -08:00
Treehugger Robot 29496d750b Merge "Update reference doc link to ci.android.com" 2019-03-02 00:06:12 +00:00
Mark Salyzyn aaf53538bb Add required: to debuggable
Permit product_varables: { debuggable: { required: ["remount"], }, },
so that we can add debug dependencies between build objects.

Test: compile
Bug: 122602260
Change-Id: Ibb4c5bf368f90fdb007d30b6c1da63cb9d4c6467
2019-03-01 15:14:52 -08:00
Treehugger Robot c8f83aef50 Merge "Revert $(LOCAL_PATH) handling for `certificate` and `additional_certificates` properties." 2019-03-01 22:47:53 +00:00