mirror of
https://github.com/json-c/json-c.git
synced 2026-11-05 21:20:16 +08:00
meson: Fix lld version script detection
In lld, a symbol version with undefined symbol is rejected by default. In previous CMake, we use a wildcard for all symbol, which is fine for empty program. Add --undefined-version to the detection to fix it.
This commit is contained in:
1 parent
9e99c1cfe7
commit
de70fe69fd
1 file changed
+9
-3
+9
-3
@@ -241,12 +241,18 @@ endif
|
|||||||
|
|
||||||
add_project_arguments(cc.get_supported_arguments('-Wno-unused-parameter'), language : 'c')
|
add_project_arguments(cc.get_supported_arguments('-Wno-unused-parameter'), language : 'c')
|
||||||
|
|
||||||
sym = cc.get_supported_link_arguments(
|
version_script_arg = '-Wl,--version-script,@0@/json-c.sym'.format(
|
||||||
'-Wl,--version-script,@0@/json-c.sym'.format(
|
|
||||||
meson.current_source_dir(),
|
meson.current_source_dir(),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
sym = []
|
||||||
|
if cc.has_link_argument(version_script_arg) or cc.has_multi_link_arguments(
|
||||||
|
version_script_arg,
|
||||||
|
'-Wl,--undefined-version',
|
||||||
|
)
|
||||||
|
sym = [version_script_arg]
|
||||||
|
endif
|
||||||
|
|
||||||
# Source files
|
# Source files
|
||||||
sources = files(
|
sources = files(
|
||||||
'arraylist.c', 'debug.c', 'json_c_version.c', 'json_object.c',
|
'arraylist.c', 'debug.c', 'json_c_version.c', 'json_object.c',
|
||||||
|
|||||||
Reference in new issue
Block a user