Index: third_party/afl/BUILD.gn |
diff --git a/third_party/afl/BUILD.gn b/third_party/afl/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c4627c3699468a75d30e9f8fd3af8e9c7f4bd61f |
--- /dev/null |
+++ b/third_party/afl/BUILD.gn |
@@ -0,0 +1,27 @@ |
+# Copyright 2016 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+source_set("afl_runtime") { |
+ # AFL needs this flag to be built with -Werror. This is because it uses u8* |
+ # and char* types interchangeably in its source code. The AFL Makefiles use |
+ # this flag. |
+ cflags = [ "-Wno-pointer-sign" ] |
+ |
+ configs -= [ |
+ # These functions should not be compiled with sanitizers since they |
+ # are used by the sanitizers. |
+ "//build/config/sanitizers:default_sanitizer_flags", |
+ |
+ # Every function in this library should have "default" visibility. |
+ # Thus we turn off flags which make visibility "hidden" for functions |
+ # that do not specify visibility. |
+ # The functions in this library will not conflict with others elsewhere |
+ # because they begin with a double underscore and/or are static. |
+ "//build/config/gcc:symbol_visibility_hidden", |
+ ] |
+ |
+ sources = [ |
+ "src/llvm_mode/afl-llvm-rt.o.c", |
+ ] |
+} |