Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2951 from kinke/externalWasmLd
Support external wasm-ld linker for WebAssembly targets
- Loading branch information
Showing
7 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,4 +1,16 @@ | |||
import subprocess | |||
|
|||
# Define `%baremetal_args` as LDC args making sure | # Define `%baremetal_args` as LDC args making sure | ||
# * no ldc2.conf file is used (=> no implicit command-line args), and | # * no ldc2.conf file is used (=> no implicit command-line args), and | ||
# * the empty object.d in ./inputs is imported (=> no TypeInfo, ModuleInfo, Object...). | # * the empty object.d in ./inputs is imported (=> no TypeInfo, ModuleInfo, Object...). | ||
config.substitutions.append( ('%baremetal_args', '-conf= -I' + config.test_source_root + '/baremetal/inputs') ) | config.substitutions.append( ('%baremetal_args', '-conf= -I' + config.test_source_root + '/baremetal/inputs') ) | ||
|
|||
# Add "link_WebAssembly" feature if we can link wasm (-link-internally or wasm-ld in PATH). | |||
if config.ldc_with_lld: | |||
config.available_features.add('link_WebAssembly') | |||
else: | |||
try: | |||
if (subprocess.call(["wasm-ld", "--version"]) == 0): | |||
config.available_features.add('link_WebAssembly') | |||
except OSError: | |||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters