-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable llvm wasm target #83
Closed
Shaikh-Ubaid
wants to merge
18
commits into
conda-forge:main
from
Shaikh-Ubaid:enable_llvm_wasm_target
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f37b41d
Build with target WASM
Shaikh-Ubaid 202c736
Install WASI_SDK
Shaikh-Ubaid 8e8b48d
Add a patch for crtlib dir
Shaikh-Ubaid 8bc8dd0
Support WASI_SDK for both linux and mac
Shaikh-Ubaid d6497fe
Update patch
Shaikh-Ubaid efe3b24
Use 2.27 version for c_stdlib
Shaikh-Ubaid 5351d93
Improve/Fix WASI_SDK_DOWNLOAD steps
Shaikh-Ubaid 3ac8bea
Update patch
Shaikh-Ubaid b0c76d4
Update patch
Shaikh-Ubaid 837f3f1
Update patch
Shaikh-Ubaid 9e70b23
Update patch
Shaikh-Ubaid 3812de8
Revert "Use 2.27 version for c_stdlib"
Shaikh-Ubaid 2035080
Fix c_stdlib_version to 2.28 in conda_build_config.yaml
Shaikh-Ubaid 7c01fd1
add stdlib
h-vetinari 0c2c715
remove obsolete SDK pin
h-vetinari 6efb15d
MNT: Re-rendered with conda-build 24.5.0, conda-smithy 3.36.0, and co…
4c43c72
Use alma8 docker image for new enough glibc
h-vetinari 0bf60a9
MNT: Re-rendered with conda-build 24.5.0, conda-smithy 3.36.0, and co…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
MACOSX_DEPLOYMENT_TARGET: | ||
- '11.0' | ||
MACOSX_SDK_VERSION: | ||
- '11.0' | ||
c_compiler: | ||
- clang | ||
c_compiler_version: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
MACOSX_SDK_VERSION: # [osx and x86_64] | ||
- "10.12" # [osx and x86_64] | ||
docker_image: # [linux and x86_64] | ||
- quay.io/condaforge/linux-anvil-alma-x86_64:8 # [linux and x86_64] | ||
|
||
c_stdlib_version: | ||
- '2.28' # [linux] |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
diff --git a/src/libasr/config.h b/src/libasr/config.h | ||
new file mode 100644 | ||
index 000000000..e45e05ea7 | ||
--- /dev/null | ||
+++ b/src/libasr/config.h | ||
@@ -0,0 +1,37 @@ | ||
+#ifndef LFORTRAN_CONFIG_H | ||
+#define LFORTRAN_CONFIG_H | ||
+ | ||
+/* Define if you want to enable ASSERT testing in LFortran */ | ||
+#define WITH_LFORTRAN_ASSERT | ||
+ | ||
+/* LFortran version */ | ||
+#define LFORTRAN_VERSION "0.35.0-dirty" | ||
+#define LFORTRAN_MAJOR 0 | ||
+#define LFORTRAN_MINOR 35 | ||
+#define LFORTRAN_PATCHLEVEL 0 | ||
+ | ||
+/* Define if LLVM is enabled */ | ||
+#define HAVE_LFORTRAN_LLVM | ||
+ | ||
+/* Define if RAPIDJSON is found */ | ||
+/* #undef HAVE_LFORTRAN_RAPIDJSON */ | ||
+ | ||
+/* Define if stacktrace is enabled */ | ||
+#define HAVE_LFORTRAN_STACKTRACE | ||
+#define HAVE_RUNTIME_STACKTRACE | ||
+/* #undef HAVE_LFORTRAN_BFD */ | ||
+#define HAVE_LFORTRAN_DWARFDUMP | ||
+/* #undef HAVE_LFORTRAN_LINK */ | ||
+#define HAVE_LFORTRAN_MACHO | ||
+#define HAVE_LFORTRAN_UNWIND | ||
+ | ||
+/* Define if cxxabi.h is present */ | ||
+#define HAVE_LFORTRAN_DEMANGLE | ||
+ | ||
+/* Define if XEUS is enabled */ | ||
+/* #undef HAVE_LFORTRAN_XEUS */ | ||
+ | ||
+/* Define if we should use binary modfiles */ | ||
+#define WITH_LFORTRAN_BINARY_MODFILES | ||
+ | ||
+#endif // LFORTRAN_CONFIG_H | ||
diff --git a/src/runtime/legacy/CMakeLists.txt b/src/runtime/legacy/CMakeLists.txt | ||
index 3795d800c..bebd8460f 100644 | ||
--- a/src/runtime/legacy/CMakeLists.txt | ||
+++ b/src/runtime/legacy/CMakeLists.txt | ||
@@ -1,5 +1,5 @@ | ||
set(SRC | ||
- ../../../src/libasr/runtime/lfortran_intrinsics.c | ||
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libasr/runtime/lfortran_intrinsics.c | ||
) | ||
|
||
if(WIN32) | ||
@@ -31,15 +31,15 @@ if(WITH_TARGET_WASM) | ||
message(FATAL_ERROR "'WASI_SDK_PATH' must be set when building with 'WITH_TARGET_WASM'") | ||
endif() | ||
|
||
- add_custom_command(OUTPUT lfortran_runtime_wasm.o | ||
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/lfortran_runtime_wasm.o | ||
COMMAND $ENV{WASI_SDK_PATH}/bin/clang -I${libasr_SOURCE_DIR}/.. -DCOMPILE_TO_WASM | ||
- -D_WASI_EMULATED_PROCESS_CLOCKS -c --target=wasm32-wasi ${SRC} -o lfortran_runtime_wasm.o | ||
+ -D_WASI_EMULATED_PROCESS_CLOCKS -c --target=wasm32-wasi ${SRC} -o ${CMAKE_CURRENT_SOURCE_DIR}/lfortran_runtime_wasm.o | ||
COMMENT "Cross compiling lfortran_intrinscs.c to lfortran_runtime_wasm.o" | ||
DEPENDS ${SRC}) | ||
- add_custom_target(lfortran_runtime_wasm ALL DEPENDS lfortran_runtime_wasm.o) | ||
- install(FILES lfortran_runtime_wasm.o | ||
+ add_custom_target(lfortran_runtime_wasm ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lfortran_runtime_wasm.o) | ||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lfortran_runtime_wasm.o | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
- install(FILES lfortran_runtime_wasm.o | ||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lfortran_runtime_wasm.o | ||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/..) | ||
endif() |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.