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
This this change the default behaviour does not change since
`FAKE_DYLIBS` defaults to false.
However for users who want to try out a more traditional shared library
workflow `-sFAKE_DYLIBS=0` can be used enable shared library output with
`-shared`.
At some point in the future we can consider making this the default.
Split out from #25817
self.assertContained('linking a library with `-shared` will emit a static object', err)
11909
11910
self.assertContained('emcc: warning: ignoring dynamic library libother.so when generating an object file, this will need to be included explicitly in the final link', err)
11910
11911
self.assertIsObjectFile('out.foo')
11911
11912
11913
+
# Test that adding `-sFAKE_DYIBS=0` build a real side module
self.assertNotContained('linking a library with `-shared` will emit a static object', err)
11916
+
self.assertNotContained('emcc: warning: ignoring dynamic library libother.so when generating an object file, this will need to be included explicitly in the final link', err)
11917
+
self.assertIsWasmDylib('out.foo')
11918
+
11912
11919
# Test that using an executable output name overrides the `-shared` flag, but produces a warning.
# With FAKE_DYLIBS we generate an normal object file rather than an shared object.
972
+
# This is linked with `wasm-ld --relocatable` or (`llvm-link` in the case of LTO).
944
973
iffinal_suffixinEXECUTABLE_EXTENSIONS:
945
974
diagnostics.warning('emcc', '-shared/-r used with executable output suffix. This behaviour is deprecated. Please remove -shared/-r to build an executable or avoid the executable suffix (%s) when building object files.'%final_suffix)
946
975
else:
947
-
ifoptions.shared:
948
-
diagnostics.warning('emcc', 'linking a library with `-shared` will emit a static object file. This is a form of emulation to support existing build systems. If you want to build a runtime shared library use the SIDE_MODULE setting.')
diagnostics.warning('emcc', 'linking a library with `-shared` will emit a static object file (FAKE_DYLIBS defaults to true). If you want to build a runtime shared library use the SIDE_MODULE or FAKE_DYLIBS=0.')
0 commit comments