-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Describe the bug
After updating from Xcode 16 to Xcode 26 the xcconfig arch filters stopped working.
Environment details:
os: macOS
compiler: apple-clang
ide: Xcode 26.2
arch: armv8 + x86_64
conan: 2.24.0
Conan profile:
[settings]
compiler=apple-clang
build_type=Release
compiler.cppstd=23
compiler.libcxx=libc++
arch=armv8|x86_64
os=Macos
from conan import ConanFile
from conan.tools.apple import XcodeToolchain, XcodeDeps
class ExampleConan(ConanFile):
description = ""
license = ""
author = ""
settings = "os", "build_type", "arch", "compiler"
options = {}
def generate(self):
if self.settings.os == "Macos":
tc = XcodeToolchain(self)
tc.generate()
deps = XcodeDeps(self)
deps.generate()
def requirements(self):
self.requires("glm/1.0.1")
Below is the generated file after running conan install:
// @file:conan_glm_glm_debug_armv8_x86_64.xcconfig
PACKAGE_ROOT_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] = /Users/thomas/.conan2/p/glm03b7769ae0c1f/p
// Compiler options for glm::glm
SYSTEM_HEADER_SEARCH_PATHS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] = "/Users/thomas/.conan2/p/glm03b7769ae0c1f/p/include"
GCC_PREPROCESSOR_DEFINITIONS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] =
OTHER_CFLAGS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] =
OTHER_CPLUSPLUSFLAGS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] =
FRAMEWORK_SEARCH_PATHS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] =
// Link options for glm::glm
LIBRARY_SEARCH_PATHS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] =
OTHER_LDFLAGS_glm_glm[config=Debug][arch=armv8|x86_64][sdk=macosx*] =
I was able to make the following two changes to the generated xcconfig files in my project and with these two patches I able to make it work again for Xcode 26.
- So each line that has the arch=xyz should be transformed from:
SYSTEM_HEADER_SEARCH_PATHS_glm_glm[config=Release][arch=armv8|x86_64][sdk=macosx*] = "/Users/thomas/.conan2/p/glm03b7769ae0c1f/p/include"
to:
SYSTEM_HEADER_SEARCH_PATHS_glm_glm[config=Release][arch=x86_64][sdk=macosx*] = "/Users/thomas/.conan2/p/glm03b7769ae0c1f/p/include"
SYSTEM_HEADER_SEARCH_PATHS_glm_glm[config=Release][arch=armv8][sdk=macosx*] = "/Users/thomas/.conan2/p/glm03b7769ae0c1f/p/include"
- Change arch=armv8 to arch=arm64, use
to_apple_arch
SYSTEM_HEADER_SEARCH_PATHS_glm_glm[config=Release][arch=x86_64][sdk=macosx*] = "/Users/thomas/.conan2/p/glm03b7769ae0c1f/p/include"
SYSTEM_HEADER_SEARCH_PATHS_glm_glm[config=Release][arch=arm64][sdk=macosx*] = "/Users/thomas/.conan2/p/glm03b7769ae0c1f/p/include"
Note: I'm guessing an alternative would be to run conan install twice for-each arch, but that doubles the install time, which in my case takes a long time.
How to reproduce it
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels