Skip to content

Commit 4d9825b

Browse files
committed
PrintAsObjC Test: Don't use modules for C compatibility header tests
1 parent 28a9f2d commit 4d9825b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

test/PrintAsObjC/cdecl-official.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// RUN: %check-in-clang-c %t/cdecl.h -Wnullable-to-nonnull-conversion
1313

1414
/// Build a client against cdecl.h
15-
// RUN: %clang -c %t/Client.c -fmodules -I %t \
15+
// RUN: %clang-no-modules -c %t/Client.c -I %t \
1616
// RUN: -F %S/../Inputs/clang-importer-sdk-path/frameworks \
1717
// RUN: -I %clang-include-dir -Werror \
1818
// RUN: -isysroot %S/../Inputs/clang-importer-sdk

test/PrintAsObjC/lit.local.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ config.substitutions.insert(0, ('%check-in-clang',
1111
'-isysroot %r/Inputs/clang-importer-sdk' % config.test_source_root) )
1212

1313
config.substitutions.insert(0, ('%check-in-clang-c',
14-
'%%clang -fsyntax-only -x c-header -std=c99 -fmodules '
15-
'-fmodules-validate-system-headers '
14+
'%%clang-no-modules -fsyntax-only -x c-header -std=c99 '
1615
'-Weverything -Werror -Wno-unused-macros -Wno-incomplete-module '
1716
'-Wno-auto-import -Wno-poison-system-directories '
1817
'-F %%clang-importer-sdk-path/frameworks '

test/lit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,11 @@ config.substitutions.append( ('%clangxx',
789789
"%r %s" %
790790
(config.clangxx, clang_mcp_opt)) )
791791

792+
# Alternative to %clang that doesn't require -fmodules.
793+
config.substitutions.append( ('%clang-no-modules',
794+
"%r" %
795+
(config.clang)) )
796+
792797
# This must come after all substitutions containing "%clang".
793798
# Note: %clang is the locally-built clang.
794799
# To get Xcode's clang, use %target-clang.

0 commit comments

Comments
 (0)