[fontations] Links finally

This commit is contained in:
Behdad Esfahbod 2025-03-04 03:43:10 -07:00 committed by Khaled Hosny
parent 6cac2a1ae0
commit 9439e1fdad
3 changed files with 7 additions and 4 deletions

View file

@ -14,4 +14,4 @@ libc = "0.2"
[lib]
name = "harfbuzz_fontations"
path = "lib.rs"
crate-type = ["cdylib"]
crate-type = ["staticlib"]

View file

@ -10,10 +10,10 @@ hb_rs = rust.bindgen(
cargo = find_program('cargo')
libharfbuzz_fontations = custom_target(
harfbuzz_fontations = custom_target(
'harfbuzz_fontations',
input: ['lib.rs'],
output: ['libharfbuzz_fontations.so'],
output: ['libharfbuzz_fontations.a'],
depends: [hb_rs],
env: ['OUT_DIR=' + meson.current_build_dir()],
command: [
@ -30,5 +30,5 @@ libharfbuzz_fontations = custom_target(
)
harfbuzz_fontations_dep = declare_dependency(
link_with: libharfbuzz_fontations,
link_with: harfbuzz_fontations,
)

View file

@ -453,6 +453,7 @@ hb_sources = hb_base_sources + hb_base_ragel_generated_sources
hb_headers = hb_base_headers
harfbuzz_deps = [thread_dep, m_dep] + harfbuzz_extra_deps
harfbuzz_link_args = []
if get_option('with_libstdcxx')
chosen_linker = 'cpp'
@ -523,6 +524,7 @@ if conf.get('HAVE_FONTATIONS', 0) == 1
hb_sources += hb_fontations_sources
hb_headers += hb_fontations_headers
harfbuzz_deps += [harfbuzz_fontations_dep]
harfbuzz_link_args += ['-Wl,--whole-archive', '-L' + meson.current_build_dir() + '/fontations', '-lharfbuzz_fontations', '-Wl,--no-whole-archive']
endif
have_icu = conf.get('HAVE_ICU', 0) == 1
@ -610,6 +612,7 @@ darwin_versions = [hb_version_int, '@0@.0.0'.format(hb_version_int)]
libharfbuzz = library('harfbuzz', hb_sources,
include_directories: incconfig,
dependencies: harfbuzz_deps,
link_args: harfbuzz_link_args,
cpp_args: cpp_args + extra_hb_cpp_args,
soversion: hb_so_version,
version: version,