SNSystems / llvm-project-prepo

Fork of LLVM with modifications to support a program repository
26 stars 0 forks source link

Remove the unused compilation warning. #154

Closed MaggieYingYi closed 3 years ago

MaggieYingYi commented 3 years ago

When I built the clang and pstore project using repo-based libraries and repo.cmake, I got the following error.

Remove the warning: “clang: warning: argument unused during compilation: '-stdlib=libc++'  [-Wunused-command-line-argument].

On systems where libc++ is provided but is not the default, Clang provides a flag called -stdlib= that can be used to decide which standard library is used. Using -stdlib=libc++ will select libc++. However, we use a custom built libc++ library. Clang provides a way to disable the default behavior for finding the standard library and to override it with custom paths. This can be done with: “-nostdinc++ -nostdlib++ -isystem \<install>/include/c++/v1 -L \<install>/lib -lc++”.

This commit includes:

  1. Fixed the warning.
  2. Since the unwind table section isn't supported on repo target yet. add the -fno-unwind-tables to the compile flags.