summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-11-20 09:08:59 +0100
committerGitHub <noreply@github.com>2019-11-20 09:08:59 +0100
commit3e8dec3c72402309b061232a2bd61ef936d8f48a (patch)
treea81dc0c898b1cf982d23b6cf34852c3af6c5c981
parentb95bbd9883f7722f5465f567cf97c47d5fc003c2 (diff)
parent02913f53d3b5dde2fc381d40cf3be988c1e66acb (diff)
Merge pull request #33757 from akien-mga/pcre2-optional-jit
pcre2: Use scons option to disable JIT on some platforms
-rw-r--r--SConstruct1
-rw-r--r--modules/regex/SCsub4
-rw-r--r--platform/javascript/detect.py1
-rw-r--r--platform/uwp/detect.py1
4 files changed, 4 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index cdbb47faea..0e282a1f12 100644
--- a/SConstruct
+++ b/SConstruct
@@ -150,6 +150,7 @@ opts.Add(BoolVariable('builtin_mbedtls', "Use the built-in mbedTLS library", Tru
opts.Add(BoolVariable('builtin_miniupnpc', "Use the built-in miniupnpc library", True))
opts.Add(BoolVariable('builtin_opus', "Use the built-in Opus library", True))
opts.Add(BoolVariable('builtin_pcre2', "Use the built-in PCRE2 library", True))
+opts.Add(BoolVariable('builtin_pcre2_with_jit', "Use JIT compiler for the built-in PCRE2 library", True))
opts.Add(BoolVariable('builtin_recast', "Use the built-in Recast library", True))
opts.Add(BoolVariable('builtin_squish', "Use the built-in squish library", True))
opts.Add(BoolVariable('builtin_xatlas', "Use the built-in xatlas library", True))
diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index 1be5af02a5..6238cd3d9f 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -6,12 +6,10 @@ Import('env_modules')
env_regex = env_modules.Clone()
if env['builtin_pcre2']:
- jit_blacklist = ['javascript', 'uwp']
-
thirdparty_dir = '#thirdparty/pcre2/src/'
thirdparty_flags = ['PCRE2_STATIC', 'HAVE_CONFIG_H']
- if 'platform' in env and env['platform'] not in jit_blacklist:
+ if env['builtin_pcre2_with_jit']:
thirdparty_flags.append('SUPPORT_JIT')
thirdparty_sources = [
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index a63fa90067..c05b765c5e 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -24,6 +24,7 @@ def get_opts():
def get_flags():
return [
('tools', False),
+ ('builtin_pcre2_with_jit', False),
# Disabling the mbedtls module reduces file size.
# The module has little use due to the limited networking functionality
# in this platform. For the available networking methods, the browser
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index 7da93eafae..000bd18e7d 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -34,6 +34,7 @@ def get_flags():
return [
('tools', False),
('xaudio2', True),
+ ('builtin_pcre2_with_jit', False),
]