make-binary-wrapper: Add -Wall -Werror -Wpedantic
This commit is contained in:
parent
c42e6741b2
commit
b7e00ed89e
|
@ -31,7 +31,12 @@ assertExecutable() {
|
||||||
# use the `strings` command or open the binary file in a text editor.
|
# use the `strings` command or open the binary file in a text editor.
|
||||||
makeWrapper() {
|
makeWrapper() {
|
||||||
assertExecutable "$1"
|
assertExecutable "$1"
|
||||||
makeDocumentedCWrapper "$1" "${@:3}" | cc -Os -x c -o "$2" -
|
makeDocumentedCWrapper "$1" "${@:3}" | \
|
||||||
|
cc \
|
||||||
|
-Wall -Werror -Wpedantic \
|
||||||
|
-Os \
|
||||||
|
-x c \
|
||||||
|
-o "$2" -
|
||||||
}
|
}
|
||||||
|
|
||||||
# Syntax: wrapProgram <PROGRAM> <MAKE-WRAPPER FLAGS...>
|
# Syntax: wrapProgram <PROGRAM> <MAKE-WRAPPER FLAGS...>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
env = { nativeBuildInputs = [ makeBinaryWrapper ]; };
|
env = { nativeBuildInputs = [ makeBinaryWrapper ]; };
|
||||||
envCheck = runCommand "envcheck" env ''
|
envCheck = runCommand "envcheck" env ''
|
||||||
${gcc}/bin/cc -o $out ${./envcheck.c}
|
${gcc}/bin/cc -Wall -Werror -Wpedantic -o $out ${./envcheck.c}
|
||||||
'';
|
'';
|
||||||
makeGoldenTest = testname: runCommand "test-wrapper_${testname}" env ''
|
makeGoldenTest = testname: runCommand "test-wrapper_${testname}" env ''
|
||||||
mkdir -p /tmp/foo
|
mkdir -p /tmp/foo
|
||||||
|
|
Loading…
Reference in a new issue