Page MenuHomePhabricator

D9196.diff
No OneTemporary

D9196.diff

diff --git a/native/android/app/build.gradle b/native/android/app/build.gradle
--- a/native/android/app/build.gradle
+++ b/native/android/app/build.gradle
@@ -616,7 +616,8 @@
"-DOPENSSL_VERSION=" + OPENSSL_VERSION,
"-DNDK_VERSION=" + rootProject.ext.ndkVersion,
"-DREACT_NATIVE_SO_DIR=${REACT_NATIVE_SO_DIR}",
- "-DBOOST_VERSION=${BOOST_VERSION}"
+ "-DBOOST_VERSION=${BOOST_VERSION}",
+ "-DCI=${System.getenv('CI')}"
targets "comm_jni_module", "turbomodulejsijni"
}
}
diff --git a/shared/cmake/corrosion-cxx.cmake b/shared/cmake/corrosion-cxx.cmake
--- a/shared/cmake/corrosion-cxx.cmake
+++ b/shared/cmake/corrosion-cxx.cmake
@@ -116,4 +116,18 @@
# For end-user to link into project
add_library(${namespace}::${_LIB_PATH_STEM} ALIAS ${_LIB_PATH_STEM}-total)
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(CARGO_BUILD_TYPE "debug")
+ elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+ set(CARGO_BUILD_TYPE "release")
+ endif()
+
+ if(CI STREQUAL "true" AND (NOT "${CARGO_BUILD_TYPE}" STREQUAL ""))
+ add_custom_command(TARGET ${_LIB_PATH_STEM}_cxxbridge POST_BUILD
+ COMMAND rm -rf cargo/build/${CARGO_BUILD_TYPE}
+ cargo/build/${Rust_CARGO_TARGET}/${CARGO_BUILD_TYPE}
+ COMMENT "Deleting Cargo artifacts for CI build"
+ )
+ endif()
endfunction(add_library_rust)

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 4:46 AM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610277
Default Alt Text
D9196.diff (1 KB)

Event Timeline