-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] use relative paths for builtin headers during module compilat…
…ion (#68023) When including builtin headers as part of a system module, ensure we use relative paths to those headers. Otherwise the module will fail to compile when specifying relative resource directories without extra search paths.
- Loading branch information
Showing
5 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module ModuleWithBuiltinHeader [system] { | ||
header "float.h" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// REQUIRES: shell | ||
|
||
// RUN: EXPECTED_RESOURCE_DIR=`%clang -print-resource-dir` && \ | ||
// RUN: mkdir -p %t && rm -rf %t/resource-dir && \ | ||
// RUN: cp -R $EXPECTED_RESOURCE_DIR %t/resource-dir | ||
// RUN: cd %t && %clang -cc1 -x objective-c -fmodules -fmodule-format=obj \ | ||
// RUN: -fimplicit-module-maps -fmodules-cache-path=%t.mcp \ | ||
// RUN: -fbuiltin-headers-in-system-modules \ | ||
// RUN: -resource-dir resource-dir \ | ||
// RUN: -emit-module %S/Inputs/builtin-headers/module.modulemap \ | ||
// RUN: -fmodule-name=ModuleWithBuiltinHeader -o %t.pcm |
396b562
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
I believe this patch is breaking the clang-ppc64-aix bot in https://lab.llvm.org/buildbot/#/builders/214/builds/10023:
Would you be able to investigate this?