[PATCH] D95516: [clang][cli] Benchmark command line round-trip
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 27 04:39:41 PST 2021
jansvoboda11 added inline comments.
================
Comment at: clang/benchmarks/CMakeLists.txt:3
+
+target_link_libraries(CompilerInvocationBench
+ PRIVATE
----------------
Not sure if we should do anything else here. I mostly cargo-culted this from clangd.
================
Comment at: clang/benchmarks/CompilerInvocationBench.cpp:11
+static std::vector<const char *> GetArgs() {
+ return {"-DHAVE___CXA_THREAD_ATEXIT_IMPL",
+ "-D_GNU_SOURCE",
----------------
It would be nice to load this from a file (e.g. `./Inputs/short-args.txt`).
What is the best approach here? Some options:
* copy the `.txt` file to the build folder via CMake and load it using `llvm::sys::fs::current_path`,
* leave the `.txt` file in source directory and hard-code the path via `CMAKE_CURRENT_SOURCE_DIR`,
* require users to supply path to the `.txt` file through command line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95516/new/
https://reviews.llvm.org/D95516
More information about the cfe-commits
mailing list