ref: 6e5836ec346233ca9c3c25ac80482c9934c3c24e
parent: d870a2fe07edafdc829a76af55792551a8fae394
author: Lennart Augustsson <lennart@augustsson.net>
date: Sat Jan 18 15:36:04 EST 2025
Allow extra flags to cc
--- a/src/MicroHs/Main.hs
+++ b/src/MicroHs/Main.hs
@@ -280,9 +280,11 @@
defs = "-D__MHS__"
cpps = concatMap (\ a -> "'" ++ a ++ "' ") (cppArgs flags) -- Use all CPP args from the command line
TTarget _ compiler conf <- readTarget flags dir
+ extra <- fromMaybe "" <$> lookupEnv "MHSEXTRACCFLAGS"
let dcc = compiler ++ " -w -Wall -O3 -I" ++ dir ++ "/src/runtime " ++
incs ++ " " ++
defs ++ " " ++
+ extra ++ " " ++
cpps ++
dir ++ "/src/runtime/eval-" ++ conf ++ ".c " ++
unwords (cArgs flags) ++