Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,38 @@ rustflags = ["-Ctarget-cpu=apple-m1"]
[target.x86_64-pc-windows-msvc]
# FORCE:MULTIPLE is a bit sketchy. v8 and rocksdb both export the same symbol.
# This seems to work around it to build on windows, but it's not ideal.
rustflags = ["-Clink-arg=/FORCE:MULTIPLE", "-Clink-arg=/STACK:4194304"]
rustflags = [
"-Clink-arg=/FORCE:MULTIPLE",
"-Clink-arg=/STACK:4194304",
"-Ctarget-feature=+crt-static",
"-Clink-arg=/DEFAULTLIB:libcmt",
"-Clink-arg=/DEFAULTLIB:libvcruntime",
"-Clink-arg=/DEFAULTLIB:libucrt",
"-Clink-arg=/NODEFAULTLIB:msvcrt", # dynamic C runtime
"-Clink-arg=/NODEFAULTLIB:msvcprt", # dynamic C++ runtime
"-Clink-arg=/NODEFAULTLIB:msvcrtd", # dynamic debug C runtime
"-Clink-arg=/NODEFAULTLIB:msvcprtd", # dynamic debug C++ runtime
"-Zpanic-abort-tests"
]

[target.x86_64-pc-windows-msvc.env]
ROCKSDB_STATIC_LIB = "1"
VCPKG_ALL_STATIC = "1"
VCPKGRS_DYNAMIC = "0"
RUSTFLAGS = "-Ctarget-feature=+crt-static"
# For native-tls
OPENSSL_STATIC = "1"
OPENSSL_NO_VENDOR = "0"
# For any dependencies using cmake
CMAKE_STATIC_VCRT = "True"
# For any dependencies using pkg-config
PKG_CONFIG_ALL_STATIC = "1"
LIBROCKSDB_STATIC = "1"
ROCKSDB_LIB_DIR = ""
SODIUM_STATIC = "1"
SODIUM_LIB_DIR = ""
RUSTY_V8_MIRROR = "https://github.com/denoland/rusty_v8/releases/download"
V8_STATIC = "1"

[target.'cfg(all())']
rustflags = ["--cfg", "tokio_unstable"]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
- name: Install JS
run: |
just rush install
just rush build

- name: Precompute release name
id: release_name
Expand All @@ -79,7 +78,7 @@ jobs:
unset ROCKSDB_LIB_DIR
unset SODIUM_USE_PKG_CONFIG
unset SNAPPY_LIB_DIR
cargo build --release -p local_backend --bin convex-local-backend
RUSTFLAGS="-Clink-arg=/VERBOSE" cargo build -vv --release -p local_backend --bin convex-local-backend
mv target/release/${{ steps.release_name.outputs.BINARY_NAME }} .

- name: Zip backend into arch
Expand Down
Loading