Skip to content

Commit

Permalink
Disable native modules by default when ART prebuilts are used.
Browse files Browse the repository at this point in the history
libjavacore unit tests and benchmark that are referenced from platform
are exempt for now.

Cherry-picked from https://r.android.com/1710849.

Test: m nothing
Test: m nothing SOONG_CONFIG_art_module_source_build=false
Bug: 172480615
Change-Id: Ie15e7a291b63a3eb470bdda9c8e3738ed54da50b
Merged-In: Ie15e7a291b63a3eb470bdda9c8e3738ed54da50b
  • Loading branch information
marstj committed May 19, 2021
1 parent 452c5b0 commit cf9a2ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions NativeCode.bp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

cc_defaults {
name: "core_native_default_flags",
defaults: ["art_module_source_build_defaults"],
host_supported: true,
cflags: [
"-Wall",
Expand Down Expand Up @@ -213,6 +214,10 @@ cc_test {
name: "libjavacore-unit-tests",
defaults: ["core_native_default_flags"],

// TODO(b/172480617): Fix this source dependency from
// platform_testing/build/tasks/tests/native_test_list.mk.
enabled: true,

// Add -fno-builtin so that the compiler doesn't attempt to inline
// memcpy calls that are not really aligned.
cflags: ["-fno-builtin"],
Expand All @@ -234,6 +239,10 @@ cc_benchmark {
name: "libjavacore-benchmarks",
defaults: ["core_native_default_flags"],

// TODO(b/172480617): Fix this source dependency from
// platform_testing/build/tasks/tests/native_metric_test_list.mk.
enabled: true,

srcs: [
"luni/src/benchmark/native/libcore_io_Memory_bench.cpp",
// libcore_io_Memory_bench.cpp includes libcore_io_Memory.cpp which
Expand Down

0 comments on commit cf9a2ad

Please sign in to comment.