Skip to content

Commit 2d3bcc0

Browse files
authored
Merge pull request #4664 from stacks-network/chore/remove-portable
Chore/remove portable
2 parents affac79 + de227cc commit 2d3bcc0

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

.cargo/config

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
44

5-
# Default to `native`
6-
# This makes it slightly faster for running tests and locally built binaries.
7-
# This can cause trouble when building "portable" binaries, such as for docker,
8-
# so disable it with the "portable" feature.
9-
[target.'cfg(not(feature = "portable"))']
10-
rustflags = ["-Ctarget-cpu=native"]
5+
# Uncomment to improve performance slightly, at the cost of portability
6+
# * Note that native binaries may not run on CPUs that are different from the build machine
7+
# [build]
8+
# rustflags = ["-Ctarget-cpu=native"]
119

1210
# Needed by perf to generate flamegraphs.
1311
#[target.x86_64-unknown-linux-gnu]

.github/actions/dockerfiles/Dockerfile.debian-source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1919
&& cd ${BUILD_DIR} \
2020
&& rustup target add ${TARGET} \
2121
&& rustup component add rustfmt \
22-
&& cargo build --features monitoring_prom,slog_json,portable --release --workspace --target ${TARGET} \
22+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
2323
&& mkdir -p /out \
2424
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2525

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apk add --no-cache musl-dev
1212

1313
RUN mkdir /out
1414

15-
RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json,portable --release
15+
RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release
1616

1717
RUN cp target/release/stacks-node /out
1818

Dockerfile.debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COPY . .
1010

1111
RUN mkdir /out
1212

13-
RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json,portable --release
13+
RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release
1414

1515
RUN cp target/release/stacks-node /out
1616

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ cargo build --release
4949
cargo build --profile release-lite
5050
```
5151

52+
_Note on building_: you may set `RUSTFLAGS` to build binaries for your native cpu:
53+
54+
```
55+
RUSTFLAGS="-Ctarget-cpu=native"
56+
```
57+
58+
or uncomment these lines in `./cargo/config`:
59+
60+
```
61+
# [build]
62+
# rustflags = ["-Ctarget-cpu=native"]
63+
```
64+
5265
## Testing
5366

5467
**Run the tests:**

stacks-signer/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,3 @@ features = ["arbitrary_precision", "unbounded_depth"]
6060
[dependencies.secp256k1]
6161
version = "0.24.3"
6262
features = ["serde", "recovery"]
63-
64-
[features]
65-
portable = []

testnet/stacks-node/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,4 @@ path = "src/stacks_events.rs"
6565
monitoring_prom = ["stacks/monitoring_prom"]
6666
slog_json = ["stacks/slog_json", "stacks-common/slog_json", "clarity/slog_json"]
6767
prod-genesis-chainstate = []
68-
portable = []
6968
default = []

0 commit comments

Comments
 (0)