Xmake Version
v3.0.9+dev
Operating System Version and Architecture
Arch Linux BTW
Describe Bug
When using PCH and std modules with G++ ≥15 (libstdc++), module unit precompilation for bits/std.cc and bits/std.compat.cc is not exempt from forcible inclusion of PCH (-include pch.hxx).
Expected Behavior
PCH not forcibly included when precompiling bits/std.cc and bits/std.compat.cc
Project Configuration
xmake.lua
xmake.lua
add_rules('mode.debug', 'mode.release')
set_languages('gnuxxlatest')
set_policy('build.c++.modules.std', true)
set_toolchains('gcc')
set_runtimes('stdc++_static')
target('example')
set_kind('binary')
add_files('main.cxx')
set_pcxxheader('pch.hxx')
set_policy('build.c++.modules', true)
main.cxx
main.cxx
#include "pch.hxx"
import std;
import std.compat;
int main() {
std::cerr << ::strerror(EAGAIN) << std::endl;
}
pch.hxx
pch.hxx
#pragma once
#include <unistd.h>
#include <errno.h>
Additional Information and Error Logs
I previously commented this on a now closed issue, but I'm also posting here with more details in case that was missed.
Xmake Version
v3.0.9+dev
Operating System Version and Architecture
Arch Linux BTW
Describe Bug
When using PCH and
stdmodules with G++ ≥15 (libstdc++), module unit precompilation forbits/std.ccandbits/std.compat.ccis not exempt from forcible inclusion of PCH (-include pch.hxx).Expected Behavior
PCH not forcibly included when precompiling
bits/std.ccandbits/std.compat.ccProject Configuration
xmake.lua
xmake.luamain.cxx
main.cxxpch.hxx
pch.hxxAdditional Information and Error Logs
I previously commented this on a now closed issue, but I'm also posting here with more details in case that was missed.