Backed out changeset 5669c20b0617 (bug 1903669) for causing crashtest failures on...
[gecko.git] / build / build-clang / fuzzing_ccov_build_clang_12.patch
blob1b60a95b9198d82cecd04523908b630a31b9db50
1 From 98bf90ef5ea3dd848ce7d81a662eb7499d11c91c Mon Sep 17 00:00:00 2001
2 From: Calixte Denizet <calixte.denizet@gmail.com>
3 Date: Fri, 16 Apr 2021 10:05:34 +0200
4 Subject: [PATCH] [Gcov] Don't run global destructor in ccov builds when env
5 MOZ_FUZZING_CCOV is existing
7 ---
8 compiler-rt/lib/profile/GCDAProfiling.c | 3 +++
9 1 file changed, 3 insertions(+)
11 diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
12 index 4293e8f7b5bf..6cda4bc7601f 100644
13 --- a/compiler-rt/lib/profile/GCDAProfiling.c
14 +++ b/compiler-rt/lib/profile/GCDAProfiling.c
15 @@ -586,6 +586,9 @@ void llvm_writeout_files(void) {
16 __attribute__((destructor(100)))
17 #endif
18 static void llvm_writeout_and_clear(void) {
19 + if (getenv("MOZ_FUZZING_CCOV")) {
20 + return;
21 + }
22 llvm_writeout_files();
23 fn_list_remove(&writeout_fn_list);
25 --
26 2.30.2