[clang] [clang][driver] Don't emit an error on an unrecognized SDK name (PR #181897)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 17 12:40:48 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 52617 tests passed
* 963 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.Driver/incompatible_sysroot.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -target x86_64-apple-darwin -Wincompatible-sysroot -isysroot SDKs/MacOSX10.9.sdk -mios-version-min=9.0 -S -o - C:\_work\llvm-project\llvm-project\clang\test\Driver\incompatible_sysroot.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix CHECK-OSX-IOS C:\_work\llvm-project\llvm-project\clang\test\Driver\incompatible_sysroot.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -target x86_64-apple-darwin -Wincompatible-sysroot -isysroot SDKs/MacOSX10.9.sdk -mios-version-min=9.0 -S -o - 'C:\_work\llvm-project\llvm-project\clang\test\Driver\incompatible_sysroot.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix CHECK-OSX-IOS 'C:\_work\llvm-project\llvm-project\clang\test\Driver\incompatible_sysroot.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Driver\incompatible_sysroot.c:18:19: error: CHECK-OSX-IOS: expected string not found in input
# | // CHECK-OSX-IOS: warning: using sysroot for 'MacOSX' but targeting 'x86_64-apple-ios9.0.0-simulator'
# |                   ^
# | <stdin>:1:1: note: scanning from here
# | clang: warning: no such sysroot directory: 'SDKs/MacOSX10.9.sdk' [-Wmissing-sysroot]
# | ^
# | <stdin>:2:8: note: possible intended match here
# | clang: warning: using sysroot for 'MacOSX10.9' but targeting 'x86_64-apple-ios9.0.0-simulator' [-Wincompatible-sysroot]
# |        ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Driver\incompatible_sysroot.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: clang: warning: no such sysroot directory: 'SDKs/MacOSX10.9.sdk' [-Wmissing-sysroot] 
# | check:18'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             2: clang: warning: using sysroot for 'MacOSX10.9' but targeting 'x86_64-apple-ios9.0.0-simulator' [-Wincompatible-sysroot] 
# | check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:18'1            ?                                                                                                                 possible intended match
# |             3:  .ios_version_min 9, 0 
# | check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |             4:  .section __TEXT,__text,regular,pure_instructions 
# | check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5:  .att_syntax 
# | check:18'0     ~~~~~~~~~~~~~
# |             6:  .globl _main ## -- Begin function main 
# | check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             7:  .p2align 4 
# | check:18'0     ~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/181897


More information about the cfe-commits mailing list