This commit is contained in:
Sammy Khamis 2021-04-28 18:30:22 -10:00
Родитель dcf897b1fb
Коммит fd733eac50
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -15,7 +15,8 @@ NSS_SRC_DIR=${1}
# Whether to cross compile from Linux to a different target. Really
# only intended for automation.
CROSS_COMPILE_TARGET=${2-}
# This will stay consistent with CARGO_CFG_TARGET_ARCH
# We only need this in a couple of places so we'll default to "unknown"
# Othertimes, it'll match what CARGO_CFG_TARGET_ARCH is on the rust side
TARGET_ARCH="unknown"
if [[ -n "${CROSS_COMPILE_TARGET}" ]] && [[ "$(uname -s)" != "Linux" ]]; then
@ -35,8 +36,7 @@ elif [[ -n "${CROSS_COMPILE_TARGET}" ]]; then
elif [[ "$(uname -s)" == "Darwin" ]]; then
DIST_DIR=$(abspath "desktop/darwin/nss")
TARGET_OS="macos"
# We need this variable for switching libs based on different macos archs (M1 vs Intel)
# Renaming uname to stay consistent with CARGO_CFG_TARGET_ARCH on the rust side
# We need to set this variable for switching libs based on different macos archs (M1 vs Intel)
if [[ "$(uname -m)" == "arm64" ]]; then
TARGET_ARCH="aarch64"
else

Просмотреть файл

@ -13,7 +13,8 @@ SQLCIPHER_SRC_DIR=${1}
# Whether to cross compile from Linux to a different target. Really
# only intended for automation.
CROSS_COMPILE_TARGET=${2-}
# This will mimic CARGO_CFG_TARGET_ARCH
# We only need this in a couple of places so we'll default to "unknown"
# Othertimes, it'll match what CARGO_CFG_TARGET_ARCH is on the rust side
TARGET_ARCH="unknown"
if [[ -n "${CROSS_COMPILE_TARGET}" ]] && [[ "$(uname -s)" != "Linux" ]]; then
@ -36,8 +37,7 @@ elif [[ "$(uname -s)" == "Darwin" ]]; then
DIST_DIR=$(abspath "desktop/darwin/sqlcipher")
NSS_DIR=$(abspath "desktop/darwin/nss")
TARGET_OS="macos"
# We need this variable for switching libs based on different macos archs (M1 vs Intel)
# Rename to stay consistent with CARGO_CFG_TARGET_ARCH on the rust side
# We need to set this variable for switching libs based on different macos archs (M1 vs Intel)
if [[ "$(uname -m)" == "arm64" ]]; then
TARGET_ARCH="aarch64"
else