Skip to content

Commit aff3c70

Browse files
authored
Merge pull request #45 from movementlabsxyz/sebtomba/fortify-source
fix: Intel nix build issues with _FORTIFY_SOURCE
2 parents d1a6949 + 184a5d2 commit aff3c70

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

.cargo/config.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,3 @@ rustflags = [
9898
check-revoke = false
9999

100100
[env]
101-
CFLAGS = "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
102-
CXXFLAGS = "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"

.github/workflows/nix-command.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,21 @@ jobs:
2121
run-command:
2222
runs-on: ubuntu-latest
2323
steps:
24+
- name: Free Disk Space (Ubuntu)
25+
uses: jlumbroso/free-disk-space@main
26+
with:
27+
tool-cache: true
28+
2429
- uses: actions/checkout@v4
25-
30+
2631
- name: Install Nix
2732
uses: DeterminateSystems/nix-installer-action@main
28-
33+
2934
- name: Enable Nix Flakes
3035
run: |
3136
mkdir -p ~/.config/nix
3237
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
33-
38+
3439
- name: Run Command in Nix Shell
3540
run: |
3641
echo "Running command: ${{ inputs.command }}"

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# cargo checks and tests
1313
- cargo check --all-targets
1414
- cargo test
15-
15+
1616
with:
1717
command: ${{ matrix.command }}
1818
nix_flake_path: '.'

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
bzip2
6363
elfutils
6464
jemalloc
65-
glibc
6665
];
6766

6867
testDependencies = with pkgs; [
@@ -91,7 +90,9 @@
9190
docker-build = pkgs.mkShell {
9291
ROCKSDB = pkgs.rocksdb;
9392
OPENSSL_DEV = pkgs.openssl.dev;
94-
93+
94+
hardeningDisable = ["fortify"];
95+
9596
buildInputs = with pkgs; [
9697
# rust toolchain
9798
(toolchain pkgs)
@@ -101,6 +102,7 @@
101102

102103
shellHook = ''
103104
#!/usr/bin/env ${pkgs.bash}
105+
104106
# Export linker flags if on Darwin (macOS)
105107
if [[ "$(${pkgs.stdenv.hostPlatform.system})" =~ "darwin" ]]; then
106108
export LDFLAGS="-L/opt/homebrew/opt/zlib/lib"

0 commit comments

Comments
 (0)