nix: bump clang to 15 & patch Glog for CC,CXX flag (#18108)

After upgrading MacOS to Sonoma and Xcode to 15, pod install stage would fail with clang errors.
Turns out that react-native's configure glog script sets 2 additional flags, CC and CXX which conflicts with flags already set in nix iOS shell.

In this commit we :

- bump clang from 10.0.0 to 15.0.7
- patch glog configure script to avoid setting those flags

This fixes the iOS builds.
This commit is contained in:
Siddarth Kumar 2023-12-07 15:36:08 +05:30 committed by GitHub
parent dc587e493f
commit 3ad345519b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -14,6 +14,7 @@ stdenv.mkDerivation {
"patchJavaPhase"
"patchReactNativePhase"
"patchPodPhase"
"patchGlogPhase"
"installPhase"
];
@ -98,6 +99,14 @@ stdenv.mkDerivation {
'[RCTConvert UIColor:options.tintColor() ? @(*options.tintColor()) : nil];'
'';
# Fix pod issue after upgrading to MacOS Sonoma and Xcode 15
# https://github.com/status-im/status-mobile/issues/17682
patchGlogPhase = ''
substituteInPlace ./node_modules/react-native/scripts/ios-configure-glog.sh \
--replace 'export CC="' '#export CC="' \
--replace 'export CXX="' '#export CXX="'
'';
# The ELF types are incompatible with the host platform, so let's not even try
# TODO: Use Android NDK to strip binaries manually
dontPatchELF = true;

View File

@ -73,6 +73,7 @@ in {
allowHigher = true;
};
go = super.go_1_19;
clang = super.clang_15;
buildGoPackage = super.buildGo119Package;
buildGoModule = super.buildGo119Module;
gomobile = (super.gomobile.overrideAttrs (old: {