Open jwinarske opened 3 weeks ago
env["CXX"]
reads from the SCons Environment
object, not from the OS environment. Godot's buildsystem doesn't read OS environment variables, by design to ensure builds are reproducible and configurations intentional. You should pass those values as argument to the scons
command:
scons CC="..." CXX="..."
@akien-mga This is what I'm passing
scons p=linuxbsd target=editor arch=${TARGET_ARCH_NAME} \
use_llvm=yes \
use_static_cpp=yes \
optimize=speed \
lto=thin \
progress=yes \
no_editor_splash=yes \
num_jobs=${BB_NUMBER_THREADS} \
${PACKAGECONFIG_CONFARGS} \
CC="${CC}" cflags="${CFLAGS}" \
CXX="${CXX}" cxxflags="${CXXFLAGS}" \
AS="${AS}" AR="${AR}" RANLIB="${RANLIB}" \
LINK="${CXX} ${LDFLAGS} -fuse-ld=lld" \
import_env_vars=PATH,PKG_CONFIG_DIR,PKG_CONFIG_DISABLE_UNINSTALLED,PKG_CONFIG_LIBDIR,PKG_CONFIG_PATH,PKG_CONFIG_SYSROOT_DIR,PKG_CONFIG_SYSTEM_INCLU>
@Miftachul-Huda please don't high jack this issue. It is unrelated to yours.
Tested versions
4.3-stable
System information
Yocto
scarthgap
running on Fedora 40Issue description
Using externally set
CC
andCXX
will incorrectly be overwritten when usinguse_llvm
.Example external values for a cross compile:
Build setup/compile run.do_compile.txt
This patch resolves the issue:
It seems that
os.path.basename(env["CXX"])
is not correctly reading the external environment.Steps to reproduce
Set
CC
andCXX
to something other thanclang
andclang++
. e.g.Minimal reproduction project (MRP)
This is solely a build issue