[PATCH] D20741: [LibFuzzer] Fix weak linking issues building tests under OSX.
    Mehdi AMINI via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue May 31 17:27:55 PDT 2016
    
    
  
mehdi_amini added a comment.
In http://reviews.llvm.org/D20741#445133, @kcc wrote:
> No extra linker flags, please. 
>  No ifdefs, other than for an entire file, please. 
>  I am ok with this approach: 
>  Create FuzzerExtFunctionsWeak.cpp and FuzzerExtFunctionsDlsym.cpp,
>  have weak functions in the first one and dlsym in the second one.
>  Have a file scope ifdefs in these files (#if LIBFUZZER_LINUX in the first one, #if LIBFUZZER_APPLE in the second one)
There is nothing specific to Linux or Apple in these file, having such a ifdef does not seem right to me. You can handle the different in the CMake  (linking one or the other for instance).
http://reviews.llvm.org/D20741
    
    
More information about the llvm-commits
mailing list