-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
72 lines (55 loc) · 2.03 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
project('ld64', ['cpp', 'c'],
version : '951.9',
default_options : ['warning_level=3',
'cpp_std=gnu++20'])
archs = get_option('supported-archs')
srcs = []
unwinddump_srcs = []
machocheck_srcs = []
objectdump_srcs = []
objcimageinfo_srcs = []
prunetrie_srcs = []
prunetrie_inc = []
incdirs = []
subdir('src')
subdir('doc')
subdir('EXTERNAL_HEADERS')
srcs += custom_target(
'compile_stubs.h',
output : 'compile_stubs.h',
input : 'compile_stubs',
command : [find_program('src/custom/create_header.sh'), '@INPUT@', '@OUTPUT@', 'compile_stubs'])
llvm = dependency('llvm', modules : ['lto'])
blocks = dependency('blocks')
libs = ['-lxar', '-ltapi']
deps = [llvm.partial_dependency(includes : true, compile_args : true), blocks]
if host_machine.system() != 'darwin'
openssl = dependency('openssl')
deps += openssl # For corecrypto and CommonCrypto compat
endif
if host_machine.system() == 'freebsd'
libs += '-lexecinfo' # For backtrace()
endif
ld64 = executable(get_option('program-prefix') + 'ld64', srcs,
include_directories : incdirs,
link_args: libs,
dependencies: deps,
install : true)
install_symlink(get_option('program-prefix') + 'ld', pointing_to : get_option('program-prefix') + 'ld64', install_dir : get_option('bindir'))
unwinddump = executable(get_option('program-prefix') + 'unwinddump', unwinddump_srcs,
include_directories : incdirs,
install : true)
machocheck = executable(get_option('program-prefix') + 'machocheck', machocheck_srcs,
include_directories : incdirs,
install : true)
objectdump = executable(get_option('program-prefix') + 'ObjectDump', objectdump_srcs,
include_directories : incdirs,
install : true)
objcimageinfo = executable(get_option('program-prefix') + 'objcimageinfo', objcimageinfo_srcs,
include_directories : incdirs,
install : true)
libprunetrie = static_library('prunetrie', prunetrie_srcs,
include_directories : [prunetrie_inc, incdirs],
install : false)
libprunetrie_dep = declare_dependency(include_directories : prunetrie_inc,
link_with : libprunetrie)