From a1bb952e833b34fdf03bd571e7f8c948191be018 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Sat, 7 May 2022 07:29:57 -0400 Subject: [PATCH] Revert "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." This reverts commit 1c5e85b3da649c89db87abecc53b42f6eaa574c2. It broke a lot of bots with a link error: https://lab.llvm.org/buildbot/#/builders/171/builds/14222 https://lab.llvm.org/buildbot/#/builders/188/builds/13748 https://lab.llvm.org/buildbot/#/builders/109/builds/38127 --- clang-tools-extra/clangd/fuzzer/CMakeLists.txt | 2 +- clang-tools-extra/pseudo/fuzzer/CMakeLists.txt | 2 +- clang/tools/clang-fuzzer/CMakeLists.txt | 2 +- llvm/lib/FuzzMutate/CMakeLists.txt | 16 +--------------- .../llvm-dlang-demangle-fuzzer/CMakeLists.txt | 2 +- llvm/tools/llvm-isel-fuzzer/CMakeLists.txt | 1 - .../llvm-itanium-demangle-fuzzer/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- llvm/tools/llvm-opt-fuzzer/CMakeLists.txt | 1 - .../llvm-rust-demangle-fuzzer/CMakeLists.txt | 2 +- .../llvm-special-case-list-fuzzer/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- mlir/tools/mlir-parser-fuzzer/CMakeLists.txt | 2 +- 13 files changed, 11 insertions(+), 27 deletions(-) diff --git a/clang-tools-extra/clangd/fuzzer/CMakeLists.txt b/clang-tools-extra/clangd/fuzzer/CMakeLists.txt index eaf447858529..5600a354decb 100644 --- a/clang-tools-extra/clangd/fuzzer/CMakeLists.txt +++ b/clang-tools-extra/clangd/fuzzer/CMakeLists.txt @@ -1,5 +1,5 @@ set(LLVM_LINK_COMPONENTS - FuzzerCLI + FuzzMutate Support ) diff --git a/clang-tools-extra/pseudo/fuzzer/CMakeLists.txt b/clang-tools-extra/pseudo/fuzzer/CMakeLists.txt index 556c2f438d38..fc583de8b011 100644 --- a/clang-tools-extra/pseudo/fuzzer/CMakeLists.txt +++ b/clang-tools-extra/pseudo/fuzzer/CMakeLists.txt @@ -1,5 +1,5 @@ set(LLVM_LINK_COMPONENTS - FuzzerCLI + FuzzMutate Support ) diff --git a/clang/tools/clang-fuzzer/CMakeLists.txt b/clang/tools/clang-fuzzer/CMakeLists.txt index 80ae9b611f65..4b2243c5ceb9 100644 --- a/clang/tools/clang-fuzzer/CMakeLists.txt +++ b/clang/tools/clang-fuzzer/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} FuzzerCLI) +set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} FuzzMutate) set(CXX_FLAGS_NOFUZZ ${CMAKE_CXX_FLAGS}) set(DUMMY_MAIN DummyClangFuzzer.cpp) if(LLVM_LIB_FUZZING_ENGINE) diff --git a/llvm/lib/FuzzMutate/CMakeLists.txt b/llvm/lib/FuzzMutate/CMakeLists.txt index 0aea7fe0d8f0..47ddeb5e1d2a 100644 --- a/llvm/lib/FuzzMutate/CMakeLists.txt +++ b/llvm/lib/FuzzMutate/CMakeLists.txt @@ -1,23 +1,9 @@ -# Generic helper for fuzzer binaries. -# This should not depend on LLVM IR etc. -add_llvm_component_library(LLVMFuzzerCLI - FuzzerCLI.cpp - PARTIAL_SOURCES_INTENDED - - ADDITIONAL_HEADER_DIRS - ${LLVM_MAIN_INCLUDE_DIR}/llvm/FuzzMutate - - LINK_COMPONENTS - Support - ) - -# Library for using LLVM IR together with fuzzers. add_llvm_component_library(LLVMFuzzMutate + FuzzerCLI.cpp IRMutator.cpp OpDescriptor.cpp Operations.cpp RandomIRBuilder.cpp - PARTIAL_SOURCES_INTENDED ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR}/llvm/FuzzMutate diff --git a/llvm/tools/llvm-dlang-demangle-fuzzer/CMakeLists.txt b/llvm/tools/llvm-dlang-demangle-fuzzer/CMakeLists.txt index 427aff5c6d2e..5f90def79847 100644 --- a/llvm/tools/llvm-dlang-demangle-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-dlang-demangle-fuzzer/CMakeLists.txt @@ -1,6 +1,6 @@ set(LLVM_LINK_COMPONENTS Demangle - FuzzerCLI + FuzzMutate Support ) diff --git a/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt b/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt index 32b65384144c..6ce0835f0465 100644 --- a/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt @@ -9,7 +9,6 @@ set(LLVM_LINK_COMPONENTS BitWriter CodeGen Core - FuzzerCLI FuzzMutate IRReader MC diff --git a/llvm/tools/llvm-itanium-demangle-fuzzer/CMakeLists.txt b/llvm/tools/llvm-itanium-demangle-fuzzer/CMakeLists.txt index 18b160d2b9c8..07f02a35b203 100644 --- a/llvm/tools/llvm-itanium-demangle-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-itanium-demangle-fuzzer/CMakeLists.txt @@ -1,6 +1,6 @@ set(LLVM_LINK_COMPONENTS Demangle - FuzzerCLI + FuzzMutate Support ) diff --git a/llvm/tools/llvm-microsoft-demangle-fuzzer/CMakeLists.txt b/llvm/tools/llvm-microsoft-demangle-fuzzer/CMakeLists.txt index bacb88a3d563..d3db43a686bb 100644 --- a/llvm/tools/llvm-microsoft-demangle-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-microsoft-demangle-fuzzer/CMakeLists.txt @@ -1,6 +1,6 @@ set(LLVM_LINK_COMPONENTS Demangle - FuzzerCLI + FuzzMutate Support ) diff --git a/llvm/tools/llvm-opt-fuzzer/CMakeLists.txt b/llvm/tools/llvm-opt-fuzzer/CMakeLists.txt index 0ae3d2ee7a25..67a401f0ef7f 100644 --- a/llvm/tools/llvm-opt-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-opt-fuzzer/CMakeLists.txt @@ -14,7 +14,6 @@ set(LLVM_LINK_COMPONENTS AggressiveInstCombine InstCombine Instrumentation - FuzzerCLI FuzzMutate MC ObjCARCOpts diff --git a/llvm/tools/llvm-rust-demangle-fuzzer/CMakeLists.txt b/llvm/tools/llvm-rust-demangle-fuzzer/CMakeLists.txt index d755a07c04c5..eeb37fc50efe 100644 --- a/llvm/tools/llvm-rust-demangle-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-rust-demangle-fuzzer/CMakeLists.txt @@ -1,6 +1,6 @@ set(LLVM_LINK_COMPONENTS Demangle - FuzzerCLI + FuzzMutate Support ) diff --git a/llvm/tools/llvm-special-case-list-fuzzer/CMakeLists.txt b/llvm/tools/llvm-special-case-list-fuzzer/CMakeLists.txt index c4c65ade31c2..381f07b1ae91 100644 --- a/llvm/tools/llvm-special-case-list-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-special-case-list-fuzzer/CMakeLists.txt @@ -1,6 +1,6 @@ set(LLVM_LINK_COMPONENTS Support - FuzzerCLI + FuzzMutate ) add_llvm_fuzzer(llvm-special-case-list-fuzzer diff --git a/llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt b/llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt index e69267db393f..34027431697f 100644 --- a/llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt +++ b/llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt @@ -1,6 +1,6 @@ set(LLVM_LINK_COMPONENTS Support - FuzzerCLI + FuzzMutate ) add_llvm_fuzzer(llvm-yaml-numeric-parser-fuzzer diff --git a/mlir/tools/mlir-parser-fuzzer/CMakeLists.txt b/mlir/tools/mlir-parser-fuzzer/CMakeLists.txt index fa1d5fd24c46..4cfd31d11290 100644 --- a/mlir/tools/mlir-parser-fuzzer/CMakeLists.txt +++ b/mlir/tools/mlir-parser-fuzzer/CMakeLists.txt @@ -1,5 +1,5 @@ set(LLVM_LINK_COMPONENTS - FuzzerCLI + FuzzMutate Support ) add_llvm_fuzzer(mlir-parser-fuzzer