aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsalis.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/salis.py b/salis.py
index 2d16de3..dc0eb93 100755
--- a/salis.py
+++ b/salis.py
@@ -71,6 +71,7 @@ option_list = [
["f", "force", None, "overwrite existing simulation of given name", False, False, bool, [new]],
["F", "muta-flip", None, "cosmic rays flip bits instead of randomizing whole bytes", False, False, bool, [bench, new]],
["g", "compiler", "CC", "C compiler to use", "gcc", False, str, [bench, load, new]],
+ ["G", "compiler-flags", "FLAGS", "base set of flags to pass to C compiler", "-Wall -Wextra -Werror", False, str, [bench, load, new]],
["M", "muta-pow", "POW", "mutator range exponent (range == 2^{POW})", 32, False, ipos, [bench, new]],
["m", "mvec-pow", "POW", "memory vector size exponent (size == 2^{POW})", 20, False, ipos, [bench, new]],
["n", "name", "NAME", "name of new or loaded simulation", "def.sim", False, str, [load, new, serve]],
@@ -260,9 +261,9 @@ if args.command in ["serve"]:
info("Generated plot configuration:", plots)
- # NOTE: this server implementation is very minimal and has no built-in security!
- # *DO NOT* deploy this to the internet as it is. Only run this data server within trusted,
- # private networks.
+ # NOTE: this server implementation is very minimal and has no built-in security.
+ # Please do not put this on the internet! Only run the data server within secure
+ # networks that you own.
class Handler(SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs, directory="data")
@@ -364,7 +365,7 @@ includes = set()
defines = set()
links = set()
-flags.update({"-Wall", "-Wextra", "-Werror", f"-Iarch/{args.arch}"})
+flags.update({*args.compiler_flags.split(), f"-Iarch/{args.arch}"})
defines.add(f"-DARCH=\"{args.arch}\"")
defines.add(f"-DCOMMAND_{args.command.upper()}")