Skip to content

Commit 2ba2d1b

Browse files
committed
FrontendTool: print the compiler configuration
This adds the compiler configuration to the output similar to clang. This will allow us to identify the compiler build type, e.g. ``` Swift version 6.2-dev (LLVM 47665e034aa6f27, Swift 2b3e5dac59b8632) Target: x86_64-unknown-windows-msvc Build config: +unoptimized,+assertions,+expensive-checks,+asan,+hwasan,+msan,+ubsan ```
1 parent c8d77c6 commit 2ba2d1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,8 @@ static bool printSwiftVersion(const CompilerInvocation &Invocation) {
10911091
<< '\n';
10921092
llvm::outs() << "Target: " << Invocation.getLangOptions().Target.str()
10931093
<< '\n';
1094+
if (!llvm::cl::getCompilerBuildConfig().empty())
1095+
llvm::cl::printBuildConfig(llvm::outs());
10941096
return false;
10951097
}
10961098

0 commit comments

Comments
 (0)