Skip to content

Commit

Permalink
Merge pull request #254 from GaloisInc/dgb_1695768008-0
Browse files Browse the repository at this point in the history
Build with additional warnings and disable _FORTIFY_SOURCE for tests.
  • Loading branch information
kquick authored Sep 27, 2023
2 parents a99eb34 + 8656f41 commit ae5bd30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion disasm-test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ compileToBitCode pfx file = do
(rmFile . fst)
$ \(bc,h) ->
do liftIO $ hClose h
callProc comp ["-c", "-emit-llvm", "-O0", "-g", "-o", bc, file]
callProc comp ["-c", "-emit-llvm", "-O0", "-U_FORTIFY_SOURCE", "-g", "-o", bc, file]
return bc

-- | Use llvm-dis to parse a bitcode file, to obtain a normalized version of the
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
''
];
buildInputs = [ clang llvm pkgs.diffutils pkgs.coreutils ];
hardeningDisable = [ "all" ]; # tests will build with -O0
};
in rec {
default = llvm-pretty-bc-parser;
Expand Down
5 changes: 5 additions & 0 deletions llvm-pretty-bc-parser.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ Library

Ghc-options: -Wall
-Wunbanged-strict-patterns
-Wcompat
-Wincomplete-uni-patterns
-Wsimplifiable-class-constraints
-Wpartial-fields
-O2
-funbox-strict-fields
-fhide-source-paths

Build-depends: array >= 0.3,
base >= 4.8 && < 5,
Expand Down

0 comments on commit ae5bd30

Please sign in to comment.