OxiCloud: add RUSTFLAGS
This commit is contained in:
@@ -43,6 +43,7 @@ function update_script() {
|
|||||||
PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)"
|
PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)"
|
||||||
cd /opt/oxicloud
|
cd /opt/oxicloud
|
||||||
export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud"
|
export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud"
|
||||||
|
export RUSTFLAGS="-C target-cpu=native"
|
||||||
$STD cargo build --release
|
$STD cargo build --release
|
||||||
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
||||||
msg_ok "Updated OxiCloud"
|
msg_ok "Updated OxiCloud"
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
|
|||||||
msg_info "Building OxiCloud"
|
msg_info "Building OxiCloud"
|
||||||
cd /opt/oxicloud
|
cd /opt/oxicloud
|
||||||
export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
|
export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
|
||||||
|
export RUSTFLAGS="-C target-cpu=native"
|
||||||
$STD cargo build --release
|
$STD cargo build --release
|
||||||
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
||||||
msg_ok "Built OxiCloud"
|
msg_ok "Built OxiCloud"
|
||||||
|
|||||||
Reference in New Issue
Block a user