Jiri Daněk created PROTON-2786:
----------------------------------
Summary: Cannot cross-compile proton-c using the `zig c++` compiler
Key: PROTON-2786
URL: https://issues.apache.org/jira/browse/PROTON-2786
Project: Qpid Proton
Issue Type: Bug
Components: build
Affects Versions: proton-c-0.39.0
Reporter: Jiri Daněk
Fix For: proton-c-0.40.0
Cross-compiling with `zig cc`/`zig c++` is a very useful feature.
Here are some references how it works and why it is so nice
# https://ziglang.org/learn/overview/#cross-compiling-is-a-first-class-use-case
#
https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html
# https://jakstys.lt/2022/how-uber-uses-zig/
#
https://www.uber.com/en-CZ/blog/bootstrapping-ubers-infrastructure-on-arm64-with-zig/
# https://www.youtube.com/watch?v=SCj2J3HcEfc
What currently happens when compiling with CXX='zig c++' is the following
{noformat}
Building CXX object CMakeFiles/cmTC_44138.dir/testCXXCompiler.cxx.o
/usr/local/bin/zig -o CMakeFiles/cmTC_44138.dir/testCXXCompiler.cxx.o -c
/build/proton/app/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
info: Usage: zig [command] [options]
{noformat}
That is, it drops the `c++` part of the command line. This seems to happen when
compiling proton-c in the check for a working C++ compiler (to optionally
enable tests in C++)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]