[PATCH] D43213: [Fuzzer] Avoid the unnecessary rebuild of the custom libc++

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 10:12:03 PST 2018


vitalybuka added inline comments.


================
Comment at: compiler-rt/cmake/Modules/AddCompilerRT.cmake:541
+    USES_TERMINAL_CONFIGURE 1
+    USES_TERMINAL_BUILD 1
+    USES_TERMINAL_INSTALL 1
----------------
phosek wrote:
> vitalybuka wrote:
> > Why do you need USES_TERMINAL_ ?
> This is not really needed, but now that libc++ is being used as part of the libFuzzer build, I just found it much easier to debug build issues if the libFuzzer's libc++ build output goes to terminal rather than file log which requires extra steps to read, I'm happy to drop this if you don't like it though.
up to you.


================
Comment at: compiler-rt/lib/fuzzer/CMakeLists.txt:89
     add_custom_command(TARGET clang_rt.${name}-${arch} POST_BUILD
-      COMMAND ${CMAKE_LINKER} --whole-archive "$<TARGET_LINKER_FILE:clang_rt.${name}-${arch}>" --no-whole-archive ${dir}/src/libcxx_fuzzer_${arch}-build/lib/libc++.a -r -o ${name}.o
+      COMMAND ${CMAKE_LINKER} --whole-archive "$<TARGET_LINKER_FILE:clang_rt.${name}-${arch}>" --no-whole-archive ${dir}-bins/lib/libc++.a -r -o ${name}.o
       COMMAND ${CMAKE_OBJCOPY} --localize-hidden ${name}.o
----------------
phosek wrote:
> vitalybuka wrote:
> > Can this be just ${dir}/src/libcxx_fuzzer_${arch}/lib/libc++.a ?
> That directory no longer exists, all the binary artifacts now end up in the -bins directory.
So why to use ${dir}-bins instead of ${dir}?
I'd prefer the name without suffix here


================
Comment at: compiler-rt/test/tsan/lit.cfg:59
   libcxx_path = os.path.join(config.compiler_rt_obj_root, "lib",
-                             "tsan", "libcxx_tsan_" + config.target_arch)
-  libcxx_incdir = os.path.join(libcxx_path, "include", "c++", "v1")
+                             "tsan", "libcxx_tsan_%s-bins" % config.target_arch)
+  libcxx_incdir = os.path.join(config.libcxx_path, "include")
----------------
phosek wrote:
> vitalybuka wrote:
> > why do we need "-bins" suffix?
> I was following the naming convention used by llvm_ExternalProject_Add, but I can drop the "-bins" suffix if you prefer?
This is the primary location which will be used for linking? i'd prefer without suffix


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43213





More information about the llvm-commits mailing list