Skip to content

Commit

Permalink
[hosted] Generate .exe rather than .elf on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
WasabiFan authored and salkinium committed Apr 10, 2020
1 parent c63a536 commit bc7fda1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/build_script_generator/scons/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def build(env):
env.substitutions = env.query("::device")
env.substitutions["upload_with_artifact"] = env.has_module(":crashcatcher")
env.substitutions["with_compilation_db"] = env.has_module(":build:compilation_db")
env.substitutions["program_extension"] = ".exe" if env[":target"].identifier.family == "windows" else ".elf"
env.outbasepath = "modm/scons/site_tools"
env.template("resources/build_target.py.in", "build_target.py")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ from os.path import abspath, relpath

def build_target(env, sources):
# Building application
program = env.Program(target=env["CONFIG_PROJECT_NAME"]+".elf", source=sources)
program = env.Program(target=env["CONFIG_PROJECT_NAME"]+"{{ program_extension }}", source=sources)

%% if with_compilation_db
env.Command("compile_commands.json", sources,
Expand Down

0 comments on commit bc7fda1

Please sign in to comment.