Clone of official tools
Diff: options.py
- Revision:
- 35:da9c89f8be7d
- Parent:
- 31:8ea194f6145b
- Child:
- 36:96847d42f010
diff -r 42f20e28adf5 -r da9c89f8be7d options.py --- a/options.py Mon Feb 13 09:29:13 2017 -0600 +++ b/options.py Wed Feb 15 13:53:18 2017 -0600 @@ -100,7 +100,7 @@ """ return [fn.replace(".json", "") for fn in listdir(join(dirname(__file__), "profiles")) if fn.endswith(".json")] -def extract_profile(parser, options, toolchain): +def extract_profile(parser, options, toolchain, fallback="default"): """Extract a Toolchain profile from parsed options Positional arguments: @@ -110,7 +110,7 @@ """ profile = {'c': [], 'cxx': [], 'ld': [], 'common': [], 'asm': []} filenames = options.profile or [join(dirname(__file__), "profiles", - "default.json")] + fallback + ".json")] for filename in filenames: contents = load(open(filename)) try: