-
Notifications
You must be signed in to change notification settings - Fork 31
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
Properly set EMAR for Interprocedural Optimization #14
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,10 @@ set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_PREFIX}/em++${EMCC_SUFFIX}") | |
# and doing it everywhere. | ||
set(CMAKE_AR "${EMSCRIPTEN_PREFIX}/emar${EMCC_SUFFIX}" CACHE PATH "Path to Emscripten ar") | ||
set(CMAKE_RANLIB "${EMSCRIPTEN_PREFIX}/emranlib${EMCC_SUFFIX}" CACHE PATH "Path to Emscripten ranlib") | ||
set(CMAKE_C_COMPILER_AR "${CMAKE_AR}") | ||
set(CMAKE_CXX_COMPILER_AR "${CMAKE_AR}") | ||
set(CMAKE_C_COMPILER_RANLIB "${CMAKE_RANLIB}") | ||
set(CMAKE_CXX_COMPILER_RANLIB "${CMAKE_RANLIB}") | ||
|
||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} | ||
"${EMSCRIPTEN_TOOLCHAIN_PATH}" | ||
|
@@ -76,5 +80,5 @@ set(CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_FIND_ROOT_PATH}) | |
cmake_minimum_required(VERSION 3.7) | ||
set(CMAKE_CXX_FLAGS_INIT "-s WASM=1") | ||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-s WASM=1") | ||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-DNDEBUG -O3") | ||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "-O3 --llvm-lto 1") | ||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-DNDEBUG -O3 -flto") | ||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "-O3 --llvm-lto 1 -flto") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mosra For your reference, here's the documentation for that: https://emscripten.org/docs/compiling/WebAssembly.html#backends
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, found #13, so you are already aware There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I was having trouble with the default build running into issues with ThinLTO. @Squareys have you gotten ThinLTO working with build? I got complaints from the wasm-ld. |
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.
I would have suspected that CMake initializes these automatically based on CMAKE_AR and CMAKE_RANLIB right after the toolchain file, but I assume that is not the case?
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.
@Squareys I wish. Emscriptem's toolchain does properly handle it, but Magnum's doesn't sadly.