Skip to content

Commit

Permalink
Use system pcre2 library for tcc
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jan 31, 2024
1 parent a5c9006 commit 5436a83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5436a83

Please sign in to comment.