You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate and remove the auto-linking feature (initially in STRICT; this would let us remove llvm-nm) #8912
Talking to @dschuff it sounds like we can avoid the current llvm-nm stage in our linking. Currently we scan the symbols that way to tell which system libraries to link in. Instead, if we used .a files for system libraries and had a default linker command that included all system libraries, then wasm-ld would do everything for us. It would be simpler, and more efficient too probably. And we could remove the .symbols files.
Emscripten has non-default system libraries too, but those should be added manually anyhow with a -s command etc., that is, we don't use llvm-nm for them.
I think there two different things being confused here.
We have a fake linking system for fastcomp today that uses llvm-nm at link time. This is fastcomp only and will go away when fastcomp goes away. We don't run llvm-nm at link time with the wasm backend.
We have a "auto-library" system tries to determine which libraries to link based on which symbols the program needs. This system is based on "symbols" files and we (the emscripten devs) use uses llvm-nm to keep those files up-to-date.
I'm all in favor of removing the auto-linking system. We already removed auto-linking of js libraries in STRICT mode. We should do that same for auto-linking of native libraries.
The idea with STRICT mode is that eventually thinking behind that flag will become the default.
If you agree we my assessment perhaps you want to re-name this issue "Remove auto-detection/auto-linking of system libraries"?
We have a "auto-library" system tries to determine which libraries to link based on which symbols the program needs. This system is based on "symbols" files and we (the emscripten devs) use uses llvm-nm to keep those files up-to-date.
True, but we also use llvm-nm on the program files to find out which system libraries we need (using those symbols files). Here is example logging when building hello_libcxx.cpp:
shared:DEBUG: executed /home/azakai/Dev/sdk/upstream/bin/llvm-nm /tmp/emscripten_temp/hello_libcxx_0.o
system_libs:DEBUG: including libc (libc.a)
system_libs:DEBUG: including libcompiler_rt (libcompiler_rt.a)
system_libs:DEBUG: including libc-wasm (libc-wasm.a)
system_libs:DEBUG: including libc++ (libc++-noexcept.a)
system_libs:DEBUG: including libc++abi (libc++abi.a)
system_libs:DEBUG: including libmalloc (libdlmalloc.a)
system_libs:DEBUG: including libpthreads (libpthreads_stub.a)
system_libs:DEBUG: including libcompiler_rt_wasm (libcompiler_rt_wasm.a)
system_libs:DEBUG: including libc_rt_wasm (libc_rt_wasm.a)
changed the title [-]Avoid llvm-nm[/-][+]Deprecate and remove the auto-linking feature (initially in STRICT; this would let us remove llvm-nm)[/+]on Jul 11, 2019
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.
Activity
sbc100 commentedon Jul 3, 2019
I think there two different things being confused here.
We have a fake linking system for fastcomp today that uses llvm-nm at link time. This is fastcomp only and will go away when fastcomp goes away. We don't run llvm-nm at link time with the wasm backend.
We have a "auto-library" system tries to determine which libraries to link based on which symbols the program needs. This system is based on "symbols" files and we (the emscripten devs) use uses llvm-nm to keep those files up-to-date.
I'm all in favor of removing the auto-linking system. We already removed auto-linking of js libraries in STRICT mode. We should do that same for auto-linking of native libraries.
The idea with STRICT mode is that eventually thinking behind that flag will become the default.
If you agree we my assessment perhaps you want to re-name this issue "Remove auto-detection/auto-linking of system libraries"?
kripken commentedon Jul 8, 2019
True, but we also use
llvm-nmon the program files to find out which system libraries we need (using those symbols files). Here is example logging when buildinghello_libcxx.cpp:sbc100 commentedon Jul 9, 2019
I see. So the title of this bug should maybe be "Remove/deprecate the auto-library linking feature"?
I agree. We should probably remove it in STRICT mode initially.
[-]Avoid llvm-nm[/-][+]Deprecate and remove the auto-linking feature (initially in STRICT; this would let us remove llvm-nm)[/+]Add emscripten cache directory to default library path
Add emscripten cache directory to default library path
Add emscripten cache directory to default library path
Add emscripten cache directory to default library path
Add emscripten cache directory to default library path
Add emscripten cache directory to default library path
Add emscripten cache directory to default library path (#9436)
Perform "linking to object file" as separate phase.
Perform "linking to object file" as separate phase.
Perform "linking to object file" as separate phase.
Perform "linking to object file" as separate phase.
22 remaining items
Link system libraries by default
Always link system libraries
Link system libraries by default
Link system libraries by default
Link system libraries by default
Link system libraries by default (#10998)
stale commentedon Jul 11, 2020
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
sbc100 commentedon Jul 11, 2020
I've got a few PRs for this still lying around.
Add emscripten cache directory to default library path (emscripten-co…
Perform "linking to object file" as separate phase. (emscripten-core#…
stale commentedon Jul 11, 2021
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.