Commit Graph

5798 Commits

Author SHA1 Message Date
Przemyslaw Szczepaniak
dae5bb8f25 Add rsp and srcjar support to kotlinc build rule
am: 4b5fe9d1b4

Change-Id: Id28939fd29103701af2d24f5e56fad27b66582d3
2018-02-15 11:49:39 +00:00
Przemyslaw Szczepaniak
4b5fe9d1b4 Add rsp and srcjar support to kotlinc build rule
Rsp files are supported through helper script (gen-kotlin-build-file.sh)
that generates the kotlinc module/build xml file.

Since rsp files are supported, I've added ExtractSrcJarsCmd step
to handle srcjars extraction.

Minor reorderings to make sure that TransformKotlinToClasses
recives only .java and .kt files when called from Module.compile.

Bug: 73281388
Test: make -j hidl-doc
Change-Id: I5a40b914569018dc529903a7f2864a5aeae838e5
2018-02-14 20:47:17 +00:00
Zhizhou Yang
5f4c0d6cb3 Fix llvm-ar error caused by using lto and sanitizer together
am: 51be632b95

Change-Id: I3f66259e36671facce563b1a50814e7306513414
2018-02-14 18:38:54 +00:00
Zhizhou Yang
51be632b95 Fix llvm-ar error caused by using lto and sanitizer together
LLVM-AR does not allow passing --plugin options more than once. The
--plugin ARFLAGS that lto want to add, may already exist if sanitizer is
also turned on.

Fixed this by adding a new bool Flags.ArGoldPlugin. Set this variable to
true whenever LLVM gold plugin is needed for ArFlags. In function
TransformObjToStaticLib(), add this option to arFlags using global value
${config.LLVMGoldPlugin} if the bool value is true.

Bug: http://b/73160350
Test: build the image with make and succeeded.

Change-Id: I62785829b0a4b663225926e4aed98defc1b6da2c
(cherry picked from commit 4917049f6e)
2018-02-14 21:21:14 +08:00
Nan Zhang
afe289114a Merge "Add Respfile support for soong_zip."
am: 3bb5f2f2fa

Change-Id: Ifc59ddbd16a5cf82f7750f9927c2d0f24627fc81
2018-02-14 01:14:08 +00:00
Treehugger Robot
3bb5f2f2fa Merge "Add Respfile support for soong_zip." 2018-02-14 01:04:22 +00:00
Alan Viverette
3420beb522 Merge "Use "jar" as default type, "compile" as default scope"
am: 1fd468782a

Change-Id: Ic9060c251e4927c336fc9f176518ceff3fbe85d6
2018-02-13 23:24:09 +00:00
Treehugger Robot
1fd468782a Merge "Use "jar" as default type, "compile" as default scope" 2018-02-13 23:17:02 +00:00
Nan Zhang
674dd932d8 Add Respfile support for soong_zip.
Sometime the size of our command line passed to soong_zip go program
exceeds the cmdline size limit. So add an RespFile support with "@" special
character prefix.

The args in the cmdline will be considered together with the
args in RespFile during soong_zip running.

Test: real tests in my local machine, and compare the
res/libphonenumber.jar before and after changes.

./cmd -o test.zip '""'-C -> [./cmd,-o,test.zip,""-C]
./cmd -o test.zip '-C -f -> [./cmd,-o,test.zip,-C -f]
./cmd -o test.zip '\"'-C -f -> [./cmd,-o,test.zip,\"-C -f]
./cmd -o test.zip '\\'-C -f -> [./cmd,-o,test.zip,\\-C -f]
./cmd -o test.zip '\a'-C -f -> [./cmd,-o,test.zip,\a-C -f]

./cmd -o test.zip \'-C -> [./cmd,-o,test.zip,'-C]
./cmd -o test.zip \\-C -> [./cmd,-o,test.zip,\-C]
./cmd -o test.zip \"-C -> [./cmd,-o,test.zip,"-C]

./cmd -o test.zip "'"-C -> [./cmd,-o,test.zip,'-C]
./cmd -o test.zip "\\"-C -f -> [./cmd,-o,test.zip,\a-C -f]
./cmd -o test.zip "\""-C -f -> [./cmd,-o,test.zip,"a-C -f]

Bug: b/72484223

Change-Id: I83c3630b70c8396c8e8a3f266244d868d754c4e8
2018-02-13 15:13:01 -08:00
Pirama Arumuga Nainar
8f7ea0ebdd Search for PGO profiles in PGO_ADDITIONAL_PROFILE_DIRS
am: 49540800f0

Change-Id: Ia182ff5272cf4f42fde7a6d96a48076c1998a98e
2018-02-13 21:03:44 +00:00
Alan Viverette
6bd35eb6f5 Use "jar" as default type, "compile" as default scope
Only include dependencies for scope "compile."

Bug: 73263586
Test: ./update_current.py -s -t <build-id>
Change-Id: I2ac6055cb4c1ad1f8d7924869f54f50e5e662742
2018-02-13 15:21:18 -05:00
Pirama Arumuga Nainar
49540800f0 Search for PGO profiles in PGO_ADDITIONAL_PROFILE_DIRS
This variable can be set in BoardConfig.mk to specify a list of
additional paths that contain PGO profiles.  These directories are
searched after the predefined paths in soong/cc/pgo.go while finding
PGO profiles.

Test: Set this variable in a BoardConfig and verify that such profiles
are found and that these paths are searched after the predefined paths
in soong/cc/pgo.go.

Change-Id: I0bb9523de614d0f23aba8d51c887d8fc8f41c993
2018-02-13 09:41:13 -08:00
Dan Albert
b4e2a566f9 Merge "Disable a warning that libc++'s headers trip."
am: 1d29875829

Change-Id: I4c7c14f2634dcda7edf6f5348654fd3094f71881
2018-02-09 18:38:01 +00:00
Treehugger Robot
1d29875829 Merge "Disable a warning that libc++'s headers trip." 2018-02-09 18:23:11 +00:00
Tobias Thierer
62c06ce8ed Merge "Revert "Support filegroup in exclude_srcs""
am: f5801db4cc

Change-Id: I180101b7d1a0eeef10a1ca4bfc4198262b80c001
2018-02-09 10:07:15 +00:00
Tobias Thierer
f5801db4cc Merge "Revert "Support filegroup in exclude_srcs"" 2018-02-09 09:56:59 +00:00
Tobias Thierer
606e9de344 Revert "Support filegroup in exclude_srcs"
This reverts commit f36a3d9b6d.

Reason for revert: Broke several builds. I'm acting build cop, reverting.

Bug: 70351683

Change-Id: I775ada4e9cb6473519d51420b41b818af163da44
2018-02-09 09:46:11 +00:00
Nan Zhang
4357144070 Merge "Support filegroup in exclude_srcs"
am: a9e0fabae1

Change-Id: Iedf085da401f2ded29137b624141d7971684b38d
2018-02-09 06:55:46 +00:00
Treehugger Robot
a9e0fabae1 Merge "Support filegroup in exclude_srcs" 2018-02-09 06:49:28 +00:00
Colin Cross
c40d9b1e7f Disable duplicates warnings when merging jars
am: f91a08caca

Change-Id: I722984453c53cedf77cea8493c7185b8c8c6756d
2018-02-08 08:51:58 +00:00
Dan Albert
f2ceea7f1f Disable a warning that libc++'s headers trip.
Test: make checkbuild
Bug: None
Change-Id: I117bd9ef3f4f3c8792f4b6692d7b70ad69b6922d
2018-02-07 17:24:42 -08:00
Colin Cross
f91a08caca Disable duplicates warnings when merging jars
There are too many duplicates warnings, disable them until someone
is actually looking at them.

Bug: 69316739
Test: m checkbuild
Change-Id: I7b3315f999dff1c01b6df37ab5ca83f7b8a60bd9
2018-02-08 01:15:39 +00:00
Dan Willemsen
5f45e9b1a6 Add performance and best practices documentation
am: bc203622e6

Change-Id: I2901750a907cfb141cfea33419ae7b6928c22663
2018-02-07 21:08:03 +00:00
Nan Zhang
f36a3d9b6d Support filegroup in exclude_srcs
Test: add unit-test, m -j32
Bug: b/70351683
Change-Id: Iff83c56d45dd668d9df6131c7df2e23e5c73a21b
2018-02-07 10:18:41 -08:00
Dan Willemsen
bc203622e6 Add performance and best practices documentation
Test: check gitiles view
Change-Id: I2fa4fa5f7ee91ba586e1900542c8c334eb727a6b
2018-02-07 10:13:36 -08:00
Sundong Ahn
8b6f140b5c Merge "Change the naming policy of system_$(VER)"
am: 7a26b708a5

Change-Id: I5af4e7b2e20a18fa2e397bd91d17eb82d0231894
2018-02-07 06:32:58 +00:00
Treehugger Robot
7a26b708a5 Merge "Change the naming policy of system_$(VER)" 2018-02-07 06:26:05 +00:00
Ryan Prichard
9787126b17 Merge "Enable emutls with -flto for Android sanitize=cfi"
am: 966bdded1f

Change-Id: Ibc7b2b84d931f1ced0806a38bc719e91017e0ba0
2018-02-07 04:06:53 +00:00
Treehugger Robot
966bdded1f Merge "Enable emutls with -flto for Android sanitize=cfi" 2018-02-07 03:14:20 +00:00
Colin Cross
4009b12ead Merge "Support filegroups for version_script and related properties"
am: ca59511e21

Change-Id: I77fcf173438cab8fe8348dfab016575e0391292f
2018-02-07 01:33:45 +00:00
Stephen Hines
2180672eaf Merge "Silence warnings rather than keeping them in the logs."
am: 8646e2ea55

Change-Id: Ie6d29ab47b07711b934cc1cf19f014c5a1ee081d
2018-02-07 01:33:23 +00:00
Treehugger Robot
ca59511e21 Merge "Support filegroups for version_script and related properties" 2018-02-07 00:58:43 +00:00
Treehugger Robot
8646e2ea55 Merge "Silence warnings rather than keeping them in the logs." 2018-02-07 00:53:40 +00:00
Sundong Ahn
8222d3b31e Change the naming policy of system_$(VER)
The module name of system_$(VER) prebuilt file is system_sdk_v$(VER).
But this is inconsistent with sdk_v$(LOCAL_SDK_VERSION) in
prebuilts/sdk.
So, system_sdk_v$(VER) is changed to sdk_vsystem_$(VER) to use the same
naming policy.

Bug: 72031391
Test: build
Change-Id: I3f18b7969dda208beeefdcaefadcc42db5c1577e
2018-02-06 23:51:14 +00:00
Colin Cross
cb884b207f Merge "Add a tool to inject data into an elf, macho, or PE symbol"
am: deda6efac4

Change-Id: I69c2bb0c477cb72d78c965edecc9d8b4aefc38c6
2018-02-06 23:15:17 +00:00
Ryan Prichard
3ed1f70414 Enable emutls with -flto for Android sanitize=cfi
-fsanitize=cfi requires LTO. Normally, the Clang driver automatically
enables emutls, but it's broken with -flto, so work around it by passing
-Wl,-plugin-opt=-emulated-tls.

See https://buganizer.corp.google.com/issues/72706604#comment15

Enable the workaround with ctx.Device(), which is the same condition used
in the existing I18acac41aac885fc6635fbd55f96ba7c845eb5e7 workaround.

Bug: b/72706604
Bug: https://github.com/android-ndk/ndk/issues/498
Test: m libaudioflinger (on internal master); \
  readelf -sW symbols/system/lib64/libaudioflinger.so | grep tlNBLogWriter
  check that __emutls_t.tlNBLogWriter exists
  check that no symbols of type TLS exist

Change-Id: I2cf65574c52476843cc017ee176a7d6777e2ce0b
2018-02-06 15:11:38 -08:00
Jiyong Park
313c1cde06 Support sdk_version: "core_current"
am: 750e557011

Change-Id: Ia08877be036ad874dd01fe4a35e5d2e28322a764
2018-02-06 23:10:49 +00:00
Stephen Hines
a42e0a0eca Silence warnings rather than keeping them in the logs.
We can simply revert this patch to work on these warnings independently.

Bug: http://b/72331526
Bug: http://b/72331524
Bug: http://b/72330874
Test: Build

Change-Id: I9cec51578a1c6de33fb6f832c758b9916c61b735
2018-02-06 14:51:08 -08:00
Treehugger Robot
deda6efac4 Merge "Add a tool to inject data into an elf, macho, or PE symbol" 2018-02-06 22:51:05 +00:00
Colin Cross
2383f3b693 Support filegroups for version_script and related properties
Bug: 71715793
Test: m checkbuild
Change-Id: Ibf78a5ec88e743f29504c91057d2cfced667c8b4
2018-02-06 14:42:06 -08:00
Nan Zhang
0965552a5b Merge "Add property to enable adding tools.jar to bootclasspath."
am: 97754359cc

Change-Id: I0ed9c3390531504d8cc091ebe3e151250eea4802
2018-02-06 22:40:25 +00:00
Jiyong Park
750e557011 Support sdk_version: "core_current"
core_current is a pseudo SDK version which is a core Java API subset of
the Android API. It is expected to be mainly used for external Java
projects which are agnostic to Android; such as junit, guava, etc.

A module built with this SDK version can only link to java modules of
the same kind. It can't depend on modules built with other sdk  (e.g.
current) or without sdk.

Bug: 72206056
Test: m -j
Change-Id: I778e7b4fcb9456a12b418ffd633ea78e29951e84
2018-02-07 07:35:36 +09:00
Treehugger Robot
97754359cc Merge "Add property to enable adding tools.jar to bootclasspath." 2018-02-06 21:12:16 +00:00
Colin Cross
5498f8548b Add a tool to inject data into an elf, macho, or PE symbol
Test: symbol_inject -i a.out -o a.out2 -s symbol -v value
Change-Id: I16cd8facbae754f679bef07ab0ba23638286e1d7
2018-02-06 19:12:21 +00:00
Nan Zhang
5f8cb424aa Add property to enable adding tools.jar to bootclasspath.
Converting Doclava to Soong need tools.jar as one of its bootclasspaths.

Test:  m doclava
Bug: b/70351683
Change-Id: I0ac65fcbe1eadfc57239cde2e83b80cf441a9b69
2018-02-06 11:01:51 -08:00
Stephen Hines
3bcedd91cf Merge "Switch to clang-4579689."
am: fa54e751d9

Change-Id: I2c230f9200514c6dbc82feeca91ee77e08cebe16
2018-02-06 18:53:34 +00:00
Stephen Hines
fa54e751d9 Merge "Switch to clang-4579689." 2018-02-06 18:35:41 +00:00
Stephen Hines
b1bbaebac8 Merge "Add srhines to the OWNERS for clang.go and global.go."
am: 035f779fbe

Change-Id: I1f97fdc17c409162cccd8160c25879c9c66a73a8
2018-02-06 02:21:57 +00:00
Stephen Hines
035f779fbe Merge "Add srhines to the OWNERS for clang.go and global.go." 2018-02-05 23:57:46 +00:00
Stephen Hines
f5b969cd2b Add srhines to the OWNERS for clang.go and global.go.
These files contain the flags and selection logic for our C/C++
toolchain.

Test: N/A
Change-Id: I860ea34c226ec01ae4127a18d80e1c8be6393a83
2018-02-02 19:06:34 -08:00