-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation with Clang #830
Comments
From what I found out here, the issue described above is that the use of auto as a parameter of |
@philipportner I fixed this issue and it's compiling (with loads of warnings though). |
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
Compiling with Clang/LLD complains about duplicate symbols of supportBinaryOp
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
… local static template function std::pair<bool, auto> was used as a convenience function in DaphneDSLVisitor.cpp. According to [1] this is invalid and only works with GCC. Replacing it with a templated local function makes Clang compile it too. Further improvements to this file will be considered in future commit. [1] https://stackoverflow.com/questions/59578575/stdpairauto-auto-return-type
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
…ith Clang When compiling with clang, there is a issue at runtime (LLVM complaining about anonymous namespaces not allowed in various places). These are hereby replaced with a non-anonymous namespace. For the lack of creativity these are all called "file_local".
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
The use of EOF in our json dependency makes compilation fail with Clang
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
To accommodate various new language features, we switch the used C++ version to C++20. Tagging this to the Clang compile issue daphne-eu#830 as one of the fixes uses make_shared<[]>.
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp.
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
… local static template function std::pair<bool, auto> was used as a convenience function in DaphneDSLVisitor.cpp. According to [1] this is invalid and only works with GCC. Replacing it with a templated local function makes Clang compile it too. Further improvements to this file will be considered in future commit. [1] https://stackoverflow.com/questions/59578575/stdpairauto-auto-return-type
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
…ith Clang When compiling with clang, there is a issue at runtime (LLVM complaining about anonymous namespaces not allowed in various places). These are hereby replaced with a non-anonymous namespace. For the lack of creativity these are all called "file_local".
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Sep 24, 2024
…endency The use of EOF in our json dependency makes compilation fail with Clang. Patch is based on nlohmannjson version 3.11.3
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 4, 2024
Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp. The definition of supportsBinaryOp would need to be declared static if left i the BinaryOpCode.h header which is included in several places. Since this definition is not allowed and there is only one use, it is moved to its own file.
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 4, 2024
… local static template function std::pair<bool, auto> was used as a convenience function in DaphneDSLVisitor.cpp. According to [1] this is invalid and only works with GCC. Replacing it with a templated local function makes Clang compile it too. Further improvements to this file will be considered in future commit. [1] https://stackoverflow.com/questions/59578575/stdpairauto-auto-return-type
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 4, 2024
…ith Clang When compiling with clang, there is a issue at runtime (LLVM complaining about anonymous namespaces not allowed in various places). These are hereby replaced with a non-anonymous namespace. For the lack of creativity these are all called "file_local".
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 4, 2024
…endency The use of EOF in our json dependency makes compilation fail with Clang. Patch is based on nlohmannjson version 3.11.3
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 4, 2024
With this new CMake configuration, we silence a lot of warnings when using the LLD linker in combination with clang: ``clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]`` A CMake version bump to 3.29 is necessary for this config option. Ubuntu 24 users need to switch to the snap version of CMake. The Docker images already provide CMake 3.30
2 tasks
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp. The definition of supportsBinaryOp would need to be declared static if left i the BinaryOpCode.h header which is included in several places. Since this definition is not allowed and there is only one use, it is moved to its own file.
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
… local static template function std::pair<bool, auto> was used as a convenience function in DaphneDSLVisitor.cpp. According to [1] this is invalid and only works with GCC. Replacing it with a templated local function makes Clang compile it too. Further improvements to this file will be considered in future commit. [1] https://stackoverflow.com/questions/59578575/stdpairauto-auto-return-type
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
…ith Clang When compiling with clang, there is a issue at runtime (LLVM complaining about anonymous namespaces not allowed in various places). These are hereby replaced with a non-anonymous namespace. For the lack of creativity these are all called "file_local".
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
…endency The use of EOF in our json dependency makes compilation fail with Clang. Patch is based on nlohmannjson version 3.11.3
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
With this new CMake configuration, we silence a lot of warnings when using the LLD linker in combination with clang: ``clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]`` A CMake version bump to 3.29 is necessary for this config option. Ubuntu 24 users need to switch to the snap version of CMake. The Docker images already provide CMake 3.30
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
This commit adds the convenience option to build with Clang to the build.sh script
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
This commit enables compiling DAPHNE with Clang (tested version 18.1.3 from Ubuntu 24 LTS). Below is the collected change log of the pre-squash commits: [DAPHNE-daphne-eu#830] Fix duplicate symbol linker issue Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp. The definition of supportsBinaryOp would need to be declared static if left i the BinaryOpCode.h header which is included in several places. Since this definition is not allowed and there is only one use, it is moved to its own file. [DAPHNE-daphne-eu#830] Replace lambda function using invalid C++ with local static template function std::pair<bool, auto> was used as a convenience function in DaphneDSLVisitor.cpp. According to [1] this is invalid and only works with GCC. Replacing it with a templated local function makes Clang compile it too. Further improvements to this file will be considered in future commit. [1] https://stackoverflow.com/questions/59578575/stdpairauto-auto-return-type [DAPHNE-daphne-eu#830] Fix anonymous namespace issue when compiling with Clang When compiling with clang, there is a issue at runtime (LLVM complaining about anonymous namespaces not allowed in various places). These are hereby replaced with a non-anonymous namespace. For the lack of creativity these are all called "file_local". [DAPHNE-daphne-eu#830] Fix compilation error (with clang) in json dependency The use of EOF in our json dependency makes compilation fail with Clang. Patch is based on nlohmannjson version 3.11.3 [DAPHNE-daphne-eu#830] Silence warning when using LLD With this new CMake configuration, we silence a lot of warnings when using the LLD linker in combination with clang: ``clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]`` A CMake version bump to 3.29 is necessary for this config option. Ubuntu 24 users need to switch to the snap version of CMake. The Docker images already provide CMake 3.30 [DAPHNE-daphne-eu#830] Clang option for build.sh This commit adds the convenience option to build with Clang to the build.sh script Resolves daphne-eu#830, Closes daphne-eu#831
corepointer
added a commit
to corepointer/daphne
that referenced
this issue
Oct 6, 2024
This commit enables compiling DAPHNE with Clang (tested version 18.1.3 from Ubuntu 24 LTS). Below is the collected change log of the pre-squash commits: [DAPHNE-daphne-eu#830] Fix duplicate symbol linker issue Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp. The definition of supportsBinaryOp would need to be declared static if left i the BinaryOpCode.h header which is included in several places. Since this definition is not allowed and there is only one use, it is moved to its own file. [DAPHNE-daphne-eu#830] Replace lambda function using invalid C++ with local static template function std::pair<bool, auto> was used as a convenience function in DaphneDSLVisitor.cpp. According to [1] this is invalid and only works with GCC. Replacing it with a templated local function makes Clang compile it too. Further improvements to this file will be considered in future commit. [1] https://stackoverflow.com/questions/59578575/stdpairauto-auto-return-type [DAPHNE-daphne-eu#830] Fix anonymous namespace issue when compiling with Clang When compiling with clang, there is a issue at runtime (LLVM complaining about anonymous namespaces not allowed in various places). These are hereby replaced with a non-anonymous namespace. For the lack of creativity these are all called "file_local". [DAPHNE-daphne-eu#830] Fix compilation error (with clang) in json dependency The use of EOF in our json dependency makes compilation fail with Clang. Patch is based on nlohmannjson version 3.11.3 [DAPHNE-daphne-eu#830] Silence warning when using LLD With this new CMake configuration, we silence a lot of warnings when using the LLD linker in combination with clang: ``clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]`` A CMake version bump to 3.29 is necessary for this config option. Ubuntu 24 users need to switch to the snap version of CMake. The Docker images already provide CMake 3.30 [DAPHNE-daphne-eu#830] Clang option for build.sh This commit adds the convenience option to build with Clang to the build.sh script Resolves daphne-eu#830, Closes daphne-eu#831
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment, compiling with clang fails at least for me. Errors start with this:
This goes on until it stops with
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Clang version in the daphne-dev Docker container is the default of Ubuntu 24:
The text was updated successfully, but these errors were encountered: