diff --git a/osdk/__init__.py b/osdk/__init__.py index cf67d36..d8574db 100644 --- a/osdk/__init__.py +++ b/osdk/__init__.py @@ -36,14 +36,14 @@ def runCmd(opts: dict, args: list[str]) -> None: print(f"Usage: {args[0]} run ") sys.exit(1) - out = build.buildOne(opts.get('target', 'host-clang'), args[0]) + out = build.buildOne(opts.get('target', 'default'), args[0]) print(f"{utils.Colors.BOLD}Running: {args[0]}{utils.Colors.RESET}") utils.runCmd(out, *args[1:]) def buildCmd(opts: dict, args: list[str]) -> None: - targetName = opts.get('target', 'host-clang') + targetName = opts.get('target', 'default') if len(args) == 0: build.buildAll(targetName) @@ -53,7 +53,7 @@ def buildCmd(opts: dict, args: list[str]) -> None: def listCmd(opts: dict, args: list[str]) -> None: - targetName = opts.get('target', 'host-clang') + targetName = opts.get('target', 'default') target = targets.load(targetName) components = manifests.loadAll("src", target) diff --git a/osdk/build.py b/osdk/build.py index e19f29c..0af2cdb 100644 --- a/osdk/build.py +++ b/osdk/build.py @@ -58,7 +58,7 @@ def genNinja(out: TextIO, manifests: dict, target: dict) -> None: elif obj[1].endswith(".cpp"): writer.build( obj[0], "cxx", obj[1], order_only=target["tools"]["cxx"].get("files", "")) - elif obj[1].endswith(".s"): + elif obj[1].endswith(".s") or obj[1].endswith(".asm"): writer.build( obj[0], "as", obj[1], order_only=target["tools"]["as"].get("files", "")) diff --git a/osdk/manifests.py b/osdk/manifests.py index 9638632..df5827f 100644 --- a/osdk/manifests.py +++ b/osdk/manifests.py @@ -88,7 +88,7 @@ def findFiles(manifests: dict) -> dict: assetsPath = os.path.join(path, "assets") item["tests"] = utils.findFiles(testsPath, [".c", ".cpp"]) - item["srcs"] = utils.findFiles(path, [".c", ".cpp", ".s"]) + item["srcs"] = utils.findFiles(path, [".c", ".cpp", ".s", ".asm"]) item["assets"] = utils.findFiles(assetsPath) return manifests diff --git a/osdk/utils.py b/osdk/utils.py index be75080..469b21b 100644 --- a/osdk/utils.py +++ b/osdk/utils.py @@ -187,11 +187,10 @@ def loadJson(filename: str) -> dict: result = CACHE[filename] else: with open(filename) as f: - result = json.load(f) + result = processJson(json.load(f)) result["dir"] = os.path.dirname(filename) result["json"] = filename - result = processJson(result) CACHE[filename] = result result = copy.deepcopy(result)