From 5436a83af723f64b807127993c598b32d89b136f Mon Sep 17 00:00:00 2001 From: Rot127 Date: Wed, 31 Jan 2024 06:01:00 -0500 Subject: [PATCH] Use system pcre2 library for tcc --- .github/workflows/tcc.yml | 2 +- meson.build | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tcc.yml b/.github/workflows/tcc.yml index 2b23db911ee..b2fc18fa11b 100644 --- a/.github/workflows/tcc.yml +++ b/.github/workflows/tcc.yml @@ -62,7 +62,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get --assume-yes install python3-wheel python3-setuptools + sudo apt-get --assume-yes install python3-wheel python3-setuptools libpcre2-dev sudo python3 -m pip install ninja - name: Checkout meson from ret2libc git diff --git a/meson.build b/meson.build index 91cc3733978..a521061f793 100644 --- a/meson.build +++ b/meson.build @@ -198,7 +198,11 @@ endif # Handle PCRE2 pcre2_dep_opt = get_option('use_sys_pcre2') pcre2_dep = disabler() -if pcre2_dep_opt.enabled() or pcre2_dep_opt.auto() +if cc.get_id() == 'tcc' + # We require the system library for tcc, because tcc doesn't support + # the MSVC asm syntax PCRE2 uses. + pcre2_dep = dependency('libpcre2-8', required: true, static: true) +elif pcre2_dep_opt.enabled() or pcre2_dep_opt.auto() pcre2_dep = dependency('libpcre2-8', required: false, static: true) if not pcre2_dep.found() pcre2_dep = cc.find_library('pcre2', required: true, static: true)