Skip to content

[InstallAPI] Add test to validate cc1 arg forwarding #87666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@interface NSObject
@end

typedef unsigned char BOOL;
#ifndef NS_AVAILABLE
#define NS_AVAILABLE(x,y) __attribute__((availability(macosx,introduced=x)))
#endif
#ifndef NS_UNAVAILABLE
#define NS_UNAVAILABLE __attribute__((unavailable))
#endif
#ifndef NS_DEPRECATED_MAC
#define NS_DEPRECATED_MAC(x,y) __attribute__((availability(macosx,introduced=x,deprecated=y,message="" )));
#endif

@interface NSManagedObject
@end

@interface NSSet
@end
22 changes: 1 addition & 21 deletions clang/test/InstallAPI/extra-exclude-headers.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
; RUN: split-file %s %t
; RUN: mkdir -p %t/System/Library/Frameworks
; RUN: cp -r %S/Inputs/Simple/Simple.framework %t/System/Library/Frameworks/
; RUN: cp -r %S/Inputs/Foundation/Foundation.framework %t/System/Library/Frameworks/
; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
; RUN: yaml2obj %S/Inputs/Simple/Simple.yaml -o %t/Simple

Expand Down Expand Up @@ -184,24 +185,3 @@
],
"version": "3"
}

;--- System/Library/Frameworks/Foundation.framework/Headers/Foundation.h
@interface NSObject
@end

typedef unsigned char BOOL;
#ifndef NS_AVAILABLE
#define NS_AVAILABLE(x,y) __attribute__((availability(macosx,introduced=x)))
#endif
#ifndef NS_UNAVAILABLE
#define NS_UNAVAILABLE __attribute__((unavailable))
#endif
#ifndef NS_DEPRECATED_MAC
#define NS_DEPRECATED_MAC(x,y) __attribute__((availability(macosx,introduced=x,deprecated=y,message="" )));
#endif

@interface NSManagedObject
@end

@interface NSSet
@end
34 changes: 34 additions & 0 deletions clang/test/InstallAPI/forwarded-search-paths.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
; RUN: rm -rf %t
; RUN: split-file %s %t
; RUN: sed -e "s|DSTROOT|%/t|g" %t/input.json.in > %t/input.json

; RUN: mkdir -p %t/System/Library/Frameworks
; RUN: cp -r %S/Inputs/Foundation/Foundation.framework %t/System/Library/Frameworks/
; RUN: cp -r %S/Inputs/Simple/Simple.framework %t/System/Library/Frameworks/
; RUN: yaml2obj %S/Inputs/Simple/Simple.yaml -o %t/Simple
; RUN: mkdir -p %t/usr/include/after

; RUN: clang-installapi -target x86_64-apple-macosx10.12 \
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \
; RUN: -current_version 1.2.3 -compatibility_version 1 -o %t/Simple.tbd \
; RUN: -idirafter %t/usr/include/after \
; RUN: -F %t/System/Library/Frameworks \
; RUN: --verify-against=%t/Simple --verify-mode=ErrorsOnly \
; RUN: %t/input.json -v 2>&1 | FileCheck %s

; CHECK: "-idirafter" {{.*}}/usr/include/after"
; CHECK: #include "..." search starts here:
; CHECK: #include <...> search starts here:
; CHECK: usr/include/after
; CHECK-NEXT: End of search list.

;--- input.json.in
{
"version" : "3",
"headers" : [
{
"type" : "public",
"path" : "DSTROOT/System/Library/Frameworks/Simple.framework/Headers/Basic.h"
}
]
}