@@ -5,8 +5,6 @@ if is_ms_compiler
5
5
subdir_done ()
6
6
endif
7
7
8
- fs = import (' fs' )
9
-
10
8
# Defines the order of dependencies evaluation
11
9
subdirs = [
12
10
' common' ,
@@ -260,71 +258,39 @@ foreach subpath:subdirs
260
258
install : true )
261
259
262
260
# now build the shared driver
263
- version_map = ' @0@/@1@/version.map' .format(meson .current_source_dir(), drv_path)
264
-
265
- if not fs.is_file(version_map)
266
- if is_ms_linker
267
- link_mode = ' msvc'
268
- elif is_windows
269
- link_mode = ' mingw'
270
- else
271
- link_mode = ' gnu'
272
- endif
273
- version_map = custom_target (lib_name + ' _map' ,
274
- command : [gen_version_map, link_mode, abi_version_file, ' @OUTPUT@' , ' @INPUT@' ],
275
- input : sources,
276
- output : ' lib@0@_exports.map' .format(lib_name))
277
- version_map_path = version_map.full_path()
278
- version_map_dep = [version_map]
279
- lk_deps = [version_map]
280
-
281
- if is_ms_linker
282
- if is_ms_compiler
283
- lk_args = [' /def:' + version_map.full_path()]
284
- else
285
- lk_args = [' -Wl,/def:' + version_map.full_path()]
286
- endif
287
- else
288
- lk_args = [' -Wl,--version-script=' + version_map.full_path()]
289
- endif
261
+ if is_ms_linker
262
+ link_mode = ' msvc'
263
+ elif is_windows
264
+ link_mode = ' mingw'
290
265
else
291
- version_map_path = version_map
292
- version_map_dep = []
293
- lk_deps = [version_map]
294
-
295
- if is_windows
296
- if is_ms_linker
297
- def_file = custom_target (lib_name + ' _def' ,
298
- command : [map_to_win_cmd, ' @INPUT@' , ' @OUTPUT@' ],
299
- input : version_map,
300
- output : ' @0@_exports.def' .format(lib_name))
301
- lk_deps += [def_file]
302
-
303
- lk_args = [' -Wl,/def:' + def_file.full_path()]
304
- else
305
- mingw_map = custom_target (lib_name + ' _mingw' ,
306
- command : [map_to_win_cmd, ' @INPUT@' , ' @OUTPUT@' ],
307
- input : version_map,
308
- output : ' @0@_mingw.map' .format(lib_name))
309
- lk_deps += [mingw_map]
310
-
311
- lk_args = [' -Wl,--version-script=' + mingw_map.full_path()]
312
- endif
266
+ link_mode = ' gnu'
267
+ endif
268
+ version_map = custom_target (lib_name + ' _map' ,
269
+ command : [gen_version_map, link_mode, abi_version_file, ' @OUTPUT@' , ' @INPUT@' ],
270
+ input : sources,
271
+ output : ' lib@0@_exports.map' .format(lib_name))
272
+ lk_deps = [version_map]
273
+
274
+ if is_ms_linker
275
+ if is_ms_compiler
276
+ lk_args = [' /def:' + version_map.full_path()]
313
277
else
314
- lk_args = [' -Wl,--version-script= ' + version_map]
278
+ lk_args = [' -Wl,/def: ' + version_map.full_path() ]
315
279
endif
280
+ else
281
+ lk_args = [' -Wl,--version-script=' + version_map.full_path()]
316
282
endif
317
283
318
284
if not is_windows and developer_mode
319
285
# on unix systems check the output of the
320
286
# check-symbols.sh script, using it as a
321
287
# dependency of the .so build
322
288
lk_deps += custom_target (lib_name + ' .sym_chk' ,
323
- command : [check_symbols, version_map_path , ' @INPUT@' ],
289
+ command : [check_symbols, version_map.full_path() , ' @INPUT@' ],
324
290
capture : true ,
325
291
input : static_lib,
326
292
output : lib_name + ' .sym_chk' ,
327
- depends : version_map_dep )
293
+ depends : [version_map] )
328
294
endif
329
295
330
296
shared_lib = shared_library (lib_name, sources_pmd_info,
0 commit comments