bytebeat_compiler.py: use name CFLAGS
instead of CC_FLAGS
This commit is contained in:
parent
43b065c0fa
commit
e0a9e7f7ef
@ -23,7 +23,7 @@ PATHS["output"] = path_join(PATHS["build_dir"], PATHS["output"])
|
||||
# Default parameters
|
||||
DEFAULT_PARAMETERS = {
|
||||
"CC": "gcc",
|
||||
"CC_FLAGS": "-Ofast -Wall -Wextra -Wpedantic -Wno-unused-variable -Wno-unused-but-set-variable",
|
||||
"CFLAGS": "-Ofast -Wall -Wextra -Wpedantic -Wno-unused-variable -Wno-unused-but-set-variable",
|
||||
"INPUT_FILE": PATHS["substitute"],
|
||||
"OUTPUT_FILE": PATHS["output"]
|
||||
}
|
||||
@ -55,7 +55,7 @@ def substitute_vars(replacements: dict, text: str) -> str:
|
||||
return text
|
||||
|
||||
CC = fetch("CC")
|
||||
CC_FLAGS = fetch("CC_FLAGS")
|
||||
CFLAGS = fetch("CC_FLAGS")
|
||||
INPUT_FILE = fetch("INPUT_FILE")
|
||||
OUTPUT_FILE = fetch("OUTPUT_FILE")
|
||||
|
||||
@ -63,7 +63,7 @@ if __name__ == "__main__":
|
||||
parser = ArgumentParser(description=\
|
||||
"Substitutes supplied C (non-JavaScript!) bytebeat into the template, "
|
||||
"then attempts to compile the instance of the template. Uses "
|
||||
"environmental variables `CC`, `CC_FLAGS`, `INPUT_FILE`, "
|
||||
"environmental variables `CC`, `CFLAGS`, `INPUT_FILE`, "
|
||||
"`OUTPUT_FILE`.")
|
||||
parser.add_argument("file", type=str,
|
||||
help="bytebeat formula file (use `-` to read from stdin)")
|
||||
@ -156,4 +156,4 @@ if __name__ == "__main__":
|
||||
print("Compiling")
|
||||
|
||||
# Let the system execute aliases by calling os.system
|
||||
system(" ".join([CC, CC_FLAGS, INPUT_FILE, "-o", OUTPUT_FILE]))
|
||||
system(" ".join([CC, CFLAGS, INPUT_FILE, "-o", OUTPUT_FILE]))
|
||||
|
Loading…
Reference in New Issue
Block a user