title: Eclipse CDT clang toolchain - cannot remove stdlibc++ from linker options, but can add libc++, which one does Eclipse use?
body: <p>By default, Eclipse CDT (I'm using 9.10 on a Linux VM) links against libstdc++ when the clang toolchain is chosen. For some reason, this option cannot be permanently removed, it will just reappear after closing the settings menu and reopening.</p>
  
  <p>Eclipse also doesn't give me any warnings or errors if I add libc++ to link against, so my program gets compiled with both flags and it runs just fine. I also get no hints either, when I add <code>-stdlib=libc++</code>, which compiles and runs fine, too.</p>
  
  <p>That leaves me wondering if Eclipse ignores libc++ when libstdc++ is included.</p>
  
  <p>These are the compiler outputs I got from playing around with the flags:</p>
  
  <pre><code>1)
  clang++ -std=c++17 -Wall -Wextra -Wpedantic -O3 -emit-llvm -c -fmessage-length=0 -o main.bc ../main.cpp 
  clang++ -L/usr/lib/ -o "2015-19 P1 v2" main.bc -lc++ -lstdc++.
  
  2)
  clang++ -std=c++17 -Wall -Wextra -Wpedantic -O3 -emit-llvm -c -fmessage-length=0 -o main.bc ../main.cpp 
  clang++ -L/usr/lib/ -o "2015-19 P1 v2" main.bc -lstdc++ -lc++
  
  3)
  clang++ -stdlib=libc++ -std=c++17 -Wall -Wextra -Wpedantic -O3 -emit-llvm -c -fmessage-length=0 -o main.bc ../main.cpp 
  clang++ -L/usr/lib/ -o "2015-19 P1 v2" main.bc -lstdc++ -lc++
  
  4)
  clang++ -stdlib=libc++ -std=c++17 -Wall -Wextra -Wpedantic -O3 -emit-llvm -c -fmessage-length=0 -o main.bc ../main.cpp 
  clang++ -L/usr/lib/ -o "2015-19 P1 v2" main.bc -lc++ -lstdc++
  </code></pre>
  
  <p><strong>What I would like to know:</strong> for each of these four flag placements, which stdlib does my program ultimately get compiled with?</p>