Commit graph

894 commits

Author SHA1 Message Date
Treehugger Robot
cd406fa70b Merge "Ignore 'extern "C++"' section in a version script" 2017-12-21 15:13:34 +00:00
Jiyong Park
2db7692a74 Add [soc|device|product]_specific
Added three properties (soc_specific, device_specific, and
product_specific) that shows what a module is specific to.

`soc_specific: true` means that the module is specific to an SoC
(System-On-a-Chip) and thus need to be installed to vendor partition.
This has the same meaning as the old `vendor: true` setting.

`device_specific: true` means that the module is specific to the entire
hardware configuration of a device includeing the SoC and off-chip
peripherals. These modules are installed to odm partition (or /vendor/odm
when odm partition does not exist).

`product_specific: true` means that the module is specific to the
software configuration of a product such as country, network operator,
etc. These modules are installed to oem partition (or /system/oem when
oem partition does not exist). These modules are assumed to be agnostic
to hardware, so this property can't be true when either soc_specific or
device_specific is set to true.

Bug: 68187740
Test: Build. path_tests amended.
Change-Id: I44ff055d87d53b0d2676758c506060de54cbffa0
2017-12-21 12:16:29 +09:00
Pirama Arumuga Nainar
fadb7b511a Add 'openmp' compiler property
Bug: http://b/70692399

If a module has 'openmp: true', add '-fopenmp' to CFlags during any
compile step and pass the libomp runtime to the linker during any link
step.

Test: Build samples in http://aosp/572924
Change-Id: Ic2a6410ec69aae548edaf582ee41659b0058561e
2017-12-19 23:14:19 -08:00
Treehugger Robot
6f86613420 Merge "Add compile-time pathDeps as implicit dependencies" 2017-12-20 04:05:39 +00:00
Treehugger Robot
750e6fab06 Merge "Add default -Werror to hardware/libhardware/modules" 2017-12-20 00:08:36 +00:00
Pirama Arumuga Nainar
70ba5a38d1 Add compile-time pathDeps as implicit dependencies
Bug: http://b/70820751
Bug: http://b/70857959

Clang does not output file dependencies from the -fprofile-use= flag
during -MD/-MM.  Add this and other path dependencies as implicit Ninja
dependencies.  Generated header dependencies are retained as OrderOnly
dependencies.

Test: Perturb profdata files for hwui/skia in internal branch and verify
that the sources get rebuilt.

Change-Id: I3247d995ee27a4882172eb15ff36acf56536b6f7
2017-12-19 15:44:38 -08:00
Treehugger Robot
b267295324 Merge "Expose the NDK STLs to make." 2017-12-19 00:29:52 +00:00
Treehugger Robot
26e5a168bf Merge "Call clang-tidy with -quiet unless WITH_TIDY is set." 2017-12-16 21:02:06 +00:00
Chih-Hung Hsieh
dc0c0302e9 Call clang-tidy with -quiet unless WITH_TIDY is set.
* Default builds calls clang-tidy only if enabled locally.
  In this case, clang-tidy should be quiet.
* If WITH_TIDY is 1 or true, let clang-tidy emit default messages.
* Even with -quiet and all warnings are suppressed,
  clang-tidy emits one line message of the number of suppressed messages.
  This one-liner could be suppressed in future changes.

Bug: 69051430
Test: default build and build with WITH_TIDY=1
Change-Id: I45303149930b33544e271e6d5eeddf18c9e48d7a
2017-12-15 20:57:48 -08:00
Treehugger Robot
2555b259ad Merge "Allow NDK static libraries to use the NDK sysroot." 2017-12-16 03:14:43 +00:00
Chih-Hung Hsieh
41fe048372 Add default -Werror to hardware/libhardware/modules
Bug: 66996870
Test: normal build
Change-Id: I0e38533b0fa2970524ac98eca25b2c2fd472fc31
2017-12-15 18:08:36 -08:00
Treehugger Robot
81f139bcff Merge "Add basic NDK STL link type check." 2017-12-15 23:50:13 +00:00
Chih-Hung Hsieh
77abc230f6 Add default -Werror to tools/adt/idea
Bug: 66996870
Test: normal build
Change-Id: Id5493eacf546d3246f501ca70bac26312837947e
2017-12-15 23:37:11 +00:00
Chih-Hung Hsieh
1ef5ed54ee Add default -Werror to external/skia.
Test: normal build
Change-Id: If66639a9000865e14c1ad5288b8642dfe5583f56
2017-12-15 23:34:33 +00:00
Chih-hung Hsieh
cc64cfd81f Merge "Add default -Werror to frameworks/av/drm/mediacas" 2017-12-15 23:08:42 +00:00
Dan Albert
d0e4cc1dc4 Merge "Don't install host or VNDK libs to the NDK." 2017-12-15 23:00:21 +00:00
Dan Albert
8ba131b3e2 Expose the NDK STLs to make.
Without this any module exposed to make that uses an NDK STL will
have unsatisfied dependencies.

Test: make native
Bug: None
Change-Id: Ia456cdc230d5ebf5e1256ab131ab78248b790bc8
2017-12-15 14:51:30 -08:00
Dan Albert
202fe493e3 Add basic NDK STL link type check.
Test: make native
Bug: None
Change-Id: If883fade38c837839857d82f294c459b0dae1ce0
2017-12-15 13:56:59 -08:00
Yi Kong
85ae70556e Merge "Propagate LTO type from binary/DSO to object files" 2017-12-15 21:36:02 +00:00
Treehugger Robot
ec6cf6afde Merge "Add cflags sub-property to 'pgo'" 2017-12-15 21:10:58 +00:00
Chih-Hung Hsieh
c2996ff701 Add default -Werror to frameworks/av/drm/mediacas
Bug: 66996870
Test: normal build
Change-Id: I7af738fd1543c6c44279bbc13b02b0273e9d6533
2017-12-15 18:26:44 +00:00
Joe Onorato
09e94ab074 When compiling with the lite protobuf option, pass the option to aprotoc to force the lite runtime.
Test: make
Merged-In: I450f89d144d496a6ddfccc6a6a5a679a05809595
Change-Id: I450f89d144d496a6ddfccc6a6a5a679a05809595
2017-12-15 08:40:27 -08:00
Treehugger Robot
bf606c198b Merge "Fix: duplicated definition of llndk_headers module" 2017-12-15 06:34:41 +00:00
Dan Albert
6ab43d8597 Allow NDK static libraries to use the NDK sysroot.
Building a static library for the NDK only requires that the NDK
headers be available. Currently, A module with both
`static_ndk_lib: true` and `sdk_version: something` will have a cyclic
dependency since it both needs the NDK and is in the NDK. Create two
NDK timestamp files: one for the isolated parts of the NDK (headers
and stub libraries), and another for the full sysroot with the static
libraries.

Test: set static_ndk_lib on compiler-rt-extras, make ndk
Bug: None
Change-Id: Iab50ffa0e4cbf4cd164f376e15281030c7aad984
2017-12-14 14:13:56 -08:00
Dan Albert
281f22b3f2 Don't install host or VNDK libs to the NDK.
Test: set `static_ndk_lib: true` on compiler-rt-extras, make ndk,
    `find out/soong/ndk -name '*.a'`
Bug: None

Change-Id: I6e82d3628efb602963552d3a91ee6176e8f3d2ff
2017-12-14 14:13:56 -08:00
Jiyong Park
a46a4d5a13 Fix: duplicated definition of llndk_headers module
A llndk_headers module was double defined; one as a header lib and the
other as a static lib. Since llndk_headers is a header lib, the static
lib is now deleted.

Bug: 70617292
Test: build. (TestLlndkHeaders added)
Change-Id: I1a3e9d1a73616ea4faf03664a7a4b03bd5955629
2017-12-14 21:28:53 +09:00
Pirama Arumuga Nainar
690ed55363 Add cflags sub-property to 'pgo'
This (possibly arch-specific) property adds extra flags while building
for profiling.  For example, dex2oat requires setting
'-Wno-frame-larger-than' when instrumentation is enabled.

Test: Build 'pgo' module with the new property and inspect build.ninja
Change-Id: Ia36422a400b0e0b87cbb33b1c8e565569475a56d
2017-12-13 17:48:33 -08:00
Chih-Hung Hsieh
086ad294cc Add default -Werror to libstagefright/codecs.
Bug: 66996870
Test: normal build
Change-Id: I16c1d3b4b7ab3679b12dd0d94e5d130e33a27009
2017-12-13 15:59:53 -08:00
Chih-Hung Hsieh
38ed2ab5f1 Add default -Werror to libese/third_party/NXPNFC_P61_JCOP_Kit
Test: normal build
Change-Id: Ie20280898ac6bce8cff6caf91b93be20ef313488
2017-12-13 22:26:30 +00:00
Chih-Hung Hsieh
7434c565ff Add default -Werror to libeffects and mediaextractor.
bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ic0522ede6c62382c1c36f11ababcd389f7bcffd5
2017-12-12 18:13:02 -08:00
Chih-Hung Hsieh
7dd8778e48 Add default -Werror to frameworks/webview/chromium.
Bug: 66996870
Test: normal build
Change-Id: Ifb3a44dd073dd7f028295e102bd561feaf98cf26
2017-12-12 17:57:57 -08:00
Chih-hung Hsieh
e41f450a35 Merge "Add default -Werror to libbufferhub" 2017-12-13 01:53:46 +00:00
Justin Yun
8fe1212261 Install current VNDK libs to the versioned directories.
If PLATFORM_VNDK_VERSION has a version $VER other than "current",
install current VNDK libs to /system/lib[64]/vndk[-sp]-$VER.
Otherwise, they will be installed to /system/lib[64]/vndk[-sp].

Bug: 69883025
Test: device boot
Change-Id: Ifa8564f39687dab5b407bf2178b13022625a94f3
2017-12-13 10:47:44 +09:00
Stephen Crane
10cd187963 Propagate LTO type from binary/DSO to object files
Propagation of LTO flags from a main binary or library to its static
dependencies is necessary so that objects being linked with LTO are built as
bitcode rather than native objects. This propagation was broken when thin LTO
was added to the build system. This patch propagates the LTO mode (thin or full)
down to object and archive dependencies.

Test: Build libhwui with full and thin LTO and check that intermediate objects
are LLVM bitcode.
Change-Id: Ic57a80d75052d86940db076fbc0f5375a79c89a1
2017-12-12 14:33:45 -08:00
Chih-Hung Hsieh
1bb807bb45 Add default -Werror to libbufferhub
bug: 66996870
Test: normal build
Change-Id: I1a5d17a2752972f91fd7196128c10dddedca177d
2017-12-12 14:33:18 -08:00
Chih-Hung Hsieh
a227ea38f0 Add default -Werror to sdk/emulator/mksdcard.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I6499be53a2539143ad6785c1513fe4bd5d3a9910
2017-12-12 01:45:01 +00:00
Chih-Hung Hsieh
8fd29d3bb8 Add default -Werror to frameworks/ml/nn.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I6c7fb32b0abaf9b1dc03292daf7c584b1648eeeb
2017-12-11 23:24:46 +00:00
Chih-Hung Hsieh
75f2e70dff Add default -Werror to system/vold/tests.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I730943ace4aa329459d6280d1c2be601f7383343
2017-12-11 23:21:57 +00:00
Chih-hung Hsieh
44c235d4d7 Merge "Add default -Werror to cts." 2017-12-11 23:20:47 +00:00
Colin Cross
5beccee92c Split logtags implementations for cc and java
Logtags files in cc and java are treated fundamentally differently.
In cc, they are not used for compiling at all, but need to be passed
to Make to be combined into the global logtags list, and logtag files
are listed in a logtags property.  In java they are listed in srcs
and produce generated code that is compiled in, and so shouldn't
also need to be listed in a logtags property.

Move the logtags property to cc and export it to Make from there,
and have java extract logtags files from srcs to be exported to
Make.

Test: m checkbuild
Change-Id: I31d49289efe72db60d2f33566df771b4a3ebc8a0
2017-12-07 15:32:30 -08:00
Chih-Hung Hsieh
2c07fc68fd Add default -Werror to cts.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I4900286f75c4f0ee17967085ed7012ddbe6024c9
2017-12-07 11:22:00 -08:00
Chih-hung Hsieh
4b9bb14dd2 Merge "Remove 6 directories from WarningAllowed*Projects." 2017-12-07 17:02:15 +00:00
Chih-Hung Hsieh
b47ac038e8 Remove 6 directories from WarningAllowed*Projects.
Test: normal build
Change-Id: I44381a2a7994d9f74329b0516d2bb303b5866a66
2017-12-07 00:12:35 +00:00
Colin Cross
7a6fcbe302 Run gofmt -w
Test: none
Change-Id: I2b503e06a4ae8e72a08f6bfb64692dfd33e2b7e2
2017-12-06 13:19:14 -08:00
Chih-Hung Hsieh
809d3f8f63 Allow warnings in libbufferhub.
* This directory still has warnings.

Test: normal build
Change-Id: Ie322ebf38d828d63e9115308b8e71769fc2a452a
2017-12-05 16:51:22 -08:00
Chih-Hung Hsieh
8ca48361ef Reduce WarningAllowedProjects.
* Warnings were fixed or suppressed in these projects.

Test: normal build
Change-Id: I24ef1b59d6c5ccd50979b7d792764de9d6da7e30
2017-12-05 09:12:35 -08:00
Justin Yun
7154928c93 Install VNDK snapshot libraries for system build
When BOARD_VNDK_VERSION := <VNDK version>, or
PRODUCT_EXTRA_VNDK_VERSIONS includes the needed <VNDK version> list,
the prebuilt VNDK libs in prebuilts/vndk/ directory will be
installed.

Each prebuilt VNDK module uses "vndk_prebuilt_shared" for shared
VNDK/VNDK-SP libs.

Following is the sample configuration of a vndk snapshot module:
vndk_prebuilt_shared {
    name: "libfoo",
    version: "27",
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    arch: {
        arm64: {
            srcs: ["arm/lib64/libfoo.so"],
        },
        arm: {
            srcs: ["arm/lib/libfoo.so"],
        },
    },
}

The Android.bp for the snapshot modules will be auto-generated by a
script.

Bug: 38304393
Bug: 65377115
Bug: 68123344
Test: set BOARD_VNDK_VERSION := 27
      copy a snapshot for v27
      build with make command

Change-Id: Ib93107530dbabb4a24583f4d6e4f0c513c9adfec
2017-12-05 10:19:43 +09:00
Chih-Hung Hsieh
fa0e27a1f3 No need to dump modules added -Werror.
* This reduces size of output file wall_werror.txt.
* Stop collecting SOONG_MODULES_ADDED_WERROR.

Bug: 66996870
Test: normal build
Change-Id: Ic6d87f6ee2b36b90ad0de4ac4f6f176334aba55e
2017-12-04 15:30:26 -08:00
Treehugger Robot
9c9540d008 Merge "Add system_$(VER)" 2017-12-01 04:19:45 +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