Merge "Disable device builds on Mac" am: c3ef9288dc am: af408afd6a am: 97d9ac5f91
Original change: https://android-review.googlesource.com/c/platform/frameworks/rs/+/1861713
Change-Id: I143d5fbc6c827c260b721792a599c4a4b6769725
diff --git a/build_rs.py b/build_rs.py
index 0416109..c2faa5b 100755
--- a/build_rs.py
+++ b/build_rs.py
@@ -56,14 +56,17 @@
def build(out_dir):
- products = (
- 'aosp_arm',
- 'aosp_arm64',
- # 'aosp_mips',
- # 'aosp_mips64',
- 'aosp_x86',
- 'aosp_x86_64',
- )
+ if sys.platform == 'darwin':
+ products = ('aosp_arm',)
+ else:
+ products = (
+ 'aosp_arm',
+ 'aosp_arm64',
+ # 'aosp_mips',
+ # 'aosp_mips64',
+ 'aosp_x86',
+ 'aosp_x86_64',
+ )
for product in products:
build_product(out_dir, product)
@@ -78,13 +81,19 @@
env['TARGET_BUILD_VARIANT'] = 'userdebug'
env['TARGET_PRODUCT'] = product
- targets = [
- # PHONY target specified in frameworks/rs/Android.mk.
- 'rs-prebuilts-full',
- # We have to explicitly specify the jar for JACK to build.
- android_path('out/target/common/obj/JAVA_LIBRARIES/' +
- 'android-support-v8-renderscript_intermediates/classes.jar')
- ]
+ if sys.platform == 'darwin':
+ targets = [
+ 'llvm-rs-cc',
+ 'bcc_compat',
+ ]
+ else:
+ targets = [
+ # PHONY target specified in frameworks/rs/Android.mk.
+ 'rs-prebuilts-full',
+ # We have to explicitly specify the jar for JACK to build.
+ android_path('out/target/common/obj/JAVA_LIBRARIES/' +
+ 'android-support-v8-renderscript_intermediates/classes.jar')
+ ]
subprocess.check_call(
['build/soong/soong_ui.bash', '--make-mode'] + targets, cwd=android_path(), env=env)
@@ -113,7 +122,8 @@
def install_toolchain(build_dir, install_dir, host):
install_built_host_files(build_dir, install_dir, host)
install_clang_headers(build_dir, install_dir, host)
- install_built_device_files(build_dir, install_dir, host)
+ if not host.startswith('darwin'):
+ install_built_device_files(build_dir, install_dir, host)
install_license_files(install_dir)
# We need to package libwinpthread-1.dll for Windows. This is explicitly
# linked whenever pthreads is used, and the build system doesn't allow