@@ -102,23 +102,19 @@ def self.set_ccache_compiler_and_linker_build_settings(installer, react_native_p
102102
103103 if ccache_available
104104 Pod ::UI . puts ( "#{ message_prefix } : Ccache found at #{ ccache_path } " )
105- end
106-
107- # Using scripts wrapping the ccache executable, to allow injection of configurations
108- ccache_clang_sh = File . join ( "$(REACT_NATIVE_PATH)" , 'scripts' , 'xcode' , 'ccache-clang.sh' )
109- ccache_clangpp_sh = File . join ( "$(REACT_NATIVE_PATH)" , 'scripts' , 'xcode' , 'ccache-clang++.sh' )
105+ end
110106
111107 if ccache_available and ccache_enabled
112108 Pod ::UI . puts ( "#{ message_prefix } : Setting CC, LD, CXX & LDPLUSPLUS build settings" )
113109
110+ # Using scripts wrapping the ccache executable, to allow injection of configurations
111+ c_compiler_launcher = File . join ( "$(REACT_NATIVE_PATH)" , 'scripts' , 'xcode' , 'c-compiler-launcher.sh' )
112+
114113 projects . each do |project |
115114 project . build_configurations . each do |config |
116115 # Using the un-qualified names means you can swap in different implementations, for example ccache
117- config . build_settings [ "CC" ] = ccache_clang_sh
118- config . build_settings [ "LD" ] = ccache_clang_sh
119- config . build_settings [ "CXX" ] = ccache_clangpp_sh
120- config . build_settings [ "LDPLUSPLUS" ] = ccache_clangpp_sh
121- config . build_settings [ "CCACHE_BINARY" ] = ccache_path
116+ config . build_settings [ "C_COMPILER_LAUNCHER" ] = c_compiler_launcher
117+ config . build_settings [ "CLANG_ENABLE_EXPLICIT_MODULES_WITH_COMPILER_LAUNCHER" ] = "YES"
122118 end
123119
124120 project . save ( )
@@ -128,15 +124,12 @@ def self.set_ccache_compiler_and_linker_build_settings(installer, react_native_p
128124 elsif !ccache_available and ccache_enabled
129125 Pod ::UI . warn ( "#{ message_prefix } : Install ccache or ensure your neither passing ':ccache_enabled => true' nor setting environment variable 'USE_CCACHE=1'" )
130126 else
131- Pod ::UI . puts ( "#{ message_prefix } : Removing Ccache from CC, LD, CXX & LDPLUSPLUS build settings" )
127+ Pod ::UI . puts ( "#{ message_prefix } : Removing Ccache compiler launcher build settings" )
132128
133129 projects . each do |project |
134130 project . build_configurations . each do |config |
135- # Using the un-qualified names means you can swap in different implementations, for example ccache
136- config . build_settings [ "CC" ] = config . build_settings [ "CC" ] . gsub ( /#{ Regexp . escape ( ccache_clang_sh ) } / , '' ) if config . build_settings [ "CC" ]
137- config . build_settings [ "LD" ] = config . build_settings [ "LD" ] . gsub ( /#{ Regexp . escape ( ccache_clang_sh ) } / , "" ) if config . build_settings [ "LD" ]
138- config . build_settings [ "CXX" ] = config . build_settings [ "CXX" ] . gsub ( /#{ Regexp . escape ( ccache_clangpp_sh ) } / , "" ) if config . build_settings [ "CXX" ]
139- config . build_settings [ "LDPLUSPLUS" ] = config . build_settings [ "LDPLUSPLUS" ] . gsub ( /#{ Regexp . escape ( ccache_clangpp_sh ) } / , "" ) if config . build_settings [ "LDPLUSPLUS" ]
131+ config . build_settings . delete "C_COMPILER_LAUNCHER"
132+ config . build_settings . delete "CLANG_ENABLE_EXPLICIT_MODULES_WITH_COMPILER_LAUNCHER"
140133 end
141134
142135 project . save ( )
0 commit comments