Discussion:
clang fails libc++experimental test case...
(too old to reply)
Kevin P. Neal
2024-04-22 17:06:41 UTC
Permalink
I'm looking at failing test cases with clang+llvm and I'm developing
on FreeBSD. There are multiple failing test cases, but at the moment
I'm looking at: clang/test/Driver/experimental-library-flag.cpp

This case tests to see if clang properly attempts to link against
either libc++ or libstdc++ depending on the flags given to clang.
Except FreeBSD's implementation in clang/lib/Driver/ToolChains/FreeBSD.cpp
doesn't support libstdc++ at all and just links against libc++. The
result is a failing test.

Is this intentional? If it is we can mark the test as unsupported on
FreeBSD. If not intentional then we need to fix the clang driver.

I'd really, really like to be able to do a 'make check' on a build of
clang+llvm on FreeBSD and have all tests pass. This is part of that effort.
--
Kevin P. Neal http://www.pobox.com/~kpn/
"Not even the dumbest terrorist would choose an encryption program that
allowed the U.S. government to hold the key." -- (Fortune magazine
is smarter than the US government, Oct 29 2001, page 196.)


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-04-22 17:16:18 UTC
Permalink
Post by Kevin P. Neal
I'm looking at failing test cases with clang+llvm and I'm developing
on FreeBSD. There are multiple failing test cases, but at the moment
I'm looking at: clang/test/Driver/experimental-library-flag.cpp
This case tests to see if clang properly attempts to link against
either libc++ or libstdc++ depending on the flags given to clang.
Except FreeBSD's implementation in clang/lib/Driver/ToolChains/FreeBSD.cpp
doesn't support libstdc++ at all and just links against libc++. The
result is a failing test.
Is this intentional? If it is we can mark the test as unsupported on
FreeBSD. If not intentional then we need to fix the clang driver.
I think we ripped out libstdc++ support many years ago now. If somebody
is really interested in that use case, they could spend the time to make
it work again, although it would be tricky to do, since there is no
standard location for those headers in FreeBSD anymore. :)

So short-term it is probably best to avoid running any of those tests
with -stdlib=libstdc++.
Post by Kevin P. Neal
I'd really, really like to be able to do a 'make check' on a build of
clang+llvm on FreeBSD and have all tests pass. This is part of that effort.
How exactly are you running "make check"? Use the CMake-generated
Makefile from the upstream build system?

-Dimitry



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Kevin P. Neal
2024-04-22 18:47:04 UTC
Permalink
Post by Dimitry Andric
Post by Kevin P. Neal
I'm looking at failing test cases with clang+llvm and I'm developing
on FreeBSD. There are multiple failing test cases, but at the moment
I'm looking at: clang/test/Driver/experimental-library-flag.cpp
This case tests to see if clang properly attempts to link against
either libc++ or libstdc++ depending on the flags given to clang.
Except FreeBSD's implementation in clang/lib/Driver/ToolChains/FreeBSD.cpp
doesn't support libstdc++ at all and just links against libc++. The
result is a failing test.
Is this intentional? If it is we can mark the test as unsupported on
FreeBSD. If not intentional then we need to fix the clang driver.
I think we ripped out libstdc++ support many years ago now. If somebody
is really interested in that use case, they could spend the time to make
it work again, although it would be tricky to do, since there is no
standard location for those headers in FreeBSD anymore. :)
So short-term it is probably best to avoid running any of those tests
with -stdlib=libstdc++.
That sounds like an argument for disabling this particular test.
Post by Dimitry Andric
Post by Kevin P. Neal
I'd really, really like to be able to do a 'make check' on a build of
clang+llvm on FreeBSD and have all tests pass. This is part of that effort.
How exactly are you running "make check"? Use the CMake-generated
Makefile from the upstream build system?
I work full time developing LLVM and only build it from a tree checked
out from the official LLVM repo at GitHub. Yes, I run cmake from my
build directory and have it create all the files needed by make or by
ninja. I actually run 'ninja check' but 'make check' is easier to
talk about since everyone here already knows about make.

I only build clang. LLVM's cmake configuration allows one to build only
the parts of the project that you need. I only need clang+llvm, and it
still takes nearly two hours to run the tests on a 12-way login server.

From the shell script to I use to run cmake:

exec cmake -G Ninja \
-DLLVM_PARALLEL_LINK_JOBS=10 \
-DCMAKE_BUILD_TYPE=Debug \
-DLLVM_ENABLE_ASSERTIONS=On \
-DLLVM_ENABLE_EXPENSIVE_CHECKS=On \
-DLLVM_ENABLE_PROJECTS="clang" \
--
Kevin P. Neal http://www.pobox.com/~kpn/

"Good grief, I've just noticed I've typed in a rant. Sorry chaps!"
Keir Finlow Bates, circa 1998


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...