Skip to content

Commit 3d7322b

Browse files
committed
OxiCloud: add RUSTFLAGS
1 parent 7193f48 commit 3d7322b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

ct/oxicloud.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ function update_script() {
4343
PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)"
4444
cd /opt/oxicloud
4545
export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud"
46+
export RUSTFLAGS="-C target-cpu=native"
4647
$STD cargo build --release
4748
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
4849
msg_ok "Updated OxiCloud"

install/oxicloud-install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
2727
msg_info "Building OxiCloud"
2828
cd /opt/oxicloud
2929
export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
30+
export RUSTFLAGS="-C target-cpu=native"
3031
$STD cargo build --release
3132
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
3233
msg_ok "Built OxiCloud"

0 commit comments

Comments
 (0)