-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move dyld logic into a separate library
for now, the dylink.0 custom section support is left in the main library. ideally it would be nicer to have some api to allow users like dyld to parse and validate their own custom sections.
- Loading branch information
Showing
8 changed files
with
42 additions
and
8 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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# lib-dyld | ||
|
||
set(lib_dyld_sources | ||
"dyld.c" | ||
"dyld_plt.c" | ||
) | ||
|
||
set(lib_dyld_headers | ||
"dyld.h" | ||
) | ||
|
||
add_library(toywasm-lib-dyld STATIC ${lib_dyld_sources}) | ||
set_target_properties(toywasm-lib-dyld PROPERTIES OUTPUT_NAME toywasm-dyld) | ||
if (USE_IPO) | ||
# Note: -flto=full seems to produce considerably faster code | ||
# than -flto=thin for us. However, cmake INTERPROCEDURAL_OPTIMIZATION | ||
# always use -flto=thin for clang. | ||
# cf. https://gitlab.kitware.com/cmake/cmake/-/issues/16808 | ||
set_property(TARGET toywasm-lib-dyld PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) | ||
endif() | ||
set_property(TARGET toywasm-lib-dyld PROPERTY PUBLIC_HEADER ${lib_dyld_headers}) | ||
target_link_libraries(toywasm-lib-dyld toywasm-lib-core) | ||
target_include_directories(toywasm-lib-dyld | ||
INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include>) | ||
|
||
install(TARGETS toywasm-lib-dyld | ||
EXPORT toywasm-lib-dyld-config | ||
PUBLIC_HEADER DESTINATION include/toywasm) | ||
install(EXPORT toywasm-lib-dyld-config | ||
DESTINATION lib/cmake/toywasm-lib-dyld) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.