summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-05 19:48:17 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-05 19:48:17 +0100
commit1ca042464ff2bf651dc25073764733197e5f4cc7 (patch)
tree820cd4161b91fd27df8b3474f4168aecd870ac47
parent9ba0c19352ef61c998aef18a1de9a98c66a7291f (diff)
downloaduxp-1ca042464ff2bf651dc25073764733197e5f4cc7.tar.gz
Move FUZZING definition from toolkit to js.
-rw-r--r--js/moz.configure24
-rw-r--r--toolkit/moz.configure24
2 files changed, 24 insertions, 24 deletions
diff --git a/js/moz.configure b/js/moz.configure
index 0eeb2fc52e..eadd0e9ab3 100644
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -236,3 +236,27 @@ def ctypes_and_compile_environment(ctypes, compile_environment, _):
return ctypes and compile_environment
include('ffi.configure', when=ctypes_and_compile_environment)
+
+# Support various fuzzing options
+# ==============================================================
+with only_when('--enable-compile-environment'):
+ option('--enable-fuzzing', help='Enable fuzzing support')
+
+ @depends('--enable-fuzzing')
+ def enable_fuzzing(value):
+ if value:
+ return True
+
+ @depends(enable_fuzzing,
+ try_compile(body='__AFL_COMPILER;',
+ check_msg='for AFL compiler',
+ when='--enable-fuzzing'))
+ def enable_libfuzzer(fuzzing, afl):
+ if fuzzing and not afl:
+ return True
+
+ set_config('FUZZING', enable_fuzzing)
+ set_define('FUZZING', enable_fuzzing)
+
+ set_config('LIBFUZZER', enable_libfuzzer)
+ set_define('LIBFUZZER', enable_libfuzzer)
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index 1a8c5b1bb5..85a01e658d 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -825,27 +825,3 @@ def skia_includes(skia, skia_gpu):
return includes
set_config('SKIA_INCLUDES', skia_includes)
-
-# Support various fuzzing options
-# ==============================================================
-with only_when('--enable-compile-environment'):
- option('--enable-fuzzing', help='Enable fuzzing support')
-
- @depends('--enable-fuzzing')
- def enable_fuzzing(value):
- if value:
- return True
-
- @depends(enable_fuzzing,
- try_compile(body='__AFL_COMPILER;',
- check_msg='for AFL compiler',
- when='--enable-fuzzing'))
- def enable_libfuzzer(fuzzing, afl):
- if fuzzing and not afl:
- return True
-
- set_config('FUZZING', enable_fuzzing)
- set_define('FUZZING', enable_fuzzing)
-
- set_config('LIBFUZZER', enable_libfuzzer)
- set_define('LIBFUZZER', enable_libfuzzer)