Skip to content

Commit

Permalink
chore(deps): adapt nix derivation for lief.
Browse files Browse the repository at this point in the history
  • Loading branch information
qkaiser committed Nov 6, 2023
1 parent 0b21e44 commit 2a5b7fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ inputs: final: prev:
tomli
];

CXXFLAGS = lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-fvisibility-inlines-hidden" "-static-libstdc++" "-static-libgcc" ]
++ lib.optional stdenv.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ];
env.CXXFLAGS = toString (lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-fvisibility-inlines-hidden" "-static-libstdc++" "-static-libgcc" ]
++ lib.optional stdenv.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]);

CFLAGS = lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-static-libstdc++" "-static-libgcc" ];
LDFLAGS = lib.optional stdenv.isLinux [ "-Wl,--gc-sections" "-Wl,--exclude-libs,ALL" ];
env.CFLAGS = toString (lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-static-libstdc++" "-static-libgcc" ]);
env.LDFLAGS = toString (lib.optional stdenv.isLinux [ "-Wl,--gc-sections" "-Wl,--exclude-libs,ALL" ]);


dontUseCmakeConfigure = true;
Expand Down

0 comments on commit 2a5b7fb

Please sign in to comment.