@@ -289,14 +289,26 @@ def parseOptionsAndInitTestdirs():
289289 logging .warning (
290290 "Custom libc++ is not supported for remote runs: ignoring --libcxx arguments"
291291 )
292+ # Don't set libcxx paths for remote platforms - use SDK's libc++ instead
293+ configuration .libcxx_include_dir = None
294+ configuration .libcxx_include_target_dir = None
295+ configuration .libcxx_library_dir = None
292296 elif not (args .libcxx_include_dir and args .libcxx_library_dir ):
293297 logging .error (
294298 "Custom libc++ requires both --libcxx-include-dir and --libcxx-library-dir"
295299 )
296300 sys .exit (- 1 )
297- configuration .libcxx_include_dir = args .libcxx_include_dir
298- configuration .libcxx_include_target_dir = args .libcxx_include_target_dir
299- configuration .libcxx_library_dir = args .libcxx_library_dir
301+ else :
302+ # Use custom libcxx for local runs
303+ configuration .libcxx_include_dir = args .libcxx_include_dir
304+ configuration .libcxx_include_target_dir = args .libcxx_include_target_dir
305+ configuration .libcxx_library_dir = args .libcxx_library_dir
306+ else :
307+ # No custom libcxx specified
308+ configuration .libcxx_include_dir = None
309+ configuration .libcxx_include_target_dir = None
310+ configuration .libcxx_library_dir = None
311+
300312 configuration .cmake_build_type = args .cmake_build_type .lower ()
301313
302314 if args .channels :
@@ -309,7 +321,7 @@ def parseOptionsAndInitTestdirs():
309321 lldbtest_config .out_of_tree_debugserver = args .out_of_tree_debugserver
310322
311323 # Set SDKROOT if we are using an Apple SDK
312- if args .sysroot is not None :
324+ if args .sysroot :
313325 configuration .sdkroot = args .sysroot
314326 elif platform_system == "Darwin" and args .apple_sdk :
315327 configuration .sdkroot = seven .get_command_output (
0 commit comments