Skip to content
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

[build] Make it possible to actually build the stdlib with a prebuilt clang #34628

Merged
merged 3 commits into from Jan 6, 2021

Conversation

finagolfin
Copy link
Contributor

@finagolfin finagolfin commented Nov 8, 2020

I'm guessing passing in --native-clang-tools-path used to work fine to build the stdlib in the beginning years ago, but it had to be overridden with the --build-runtime-with-host-compiler=1 flag in recent years, as @gottesmm did with this standalone stdlib preset which I'm now removing.

@kubamracek, this should fix the issue you were addressing in #33675 the right way, rather than building all build-script-impl products with the prebuilt clang, so I revert that patch here. This prebuilt clang was only ever used to build the Swift stdlib for years, until I extended it to build the corelibs too in #32922 in July. Extending it to build everything, to fix an issue with the stdlib, seems too aggressive, maybe it can be tested properly and done later.

EDIT: @edymtt - This addresses rdar://71240426

@@ -1653,7 +1653,8 @@ function(add_swift_target_library name)
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-warn-implicit-overrides")
endif()

if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE)
if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND
NOT SWIFT_PREBUILT_CLANG)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gottesmm, I'm guessing you passed in --build-runtime-with-host-compiler=1 to the standalone stdlib preset only to keep this from erroring out? This and the next change make that flag no longer necessary.

@kubamracek
Copy link
Contributor

@swift-ci please test stdlib with toolchain

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - f84992addb0f7cd54c13762274e898f79d0b0631

@finagolfin
Copy link
Contributor Author

Stdlib CI failure is unrelated to this pull, as it's because three stdlib tests failed. That means this pull did what it's supposed to do and built the stdlib with the passed-in clang, and the test failures are because of other problems.

@finagolfin
Copy link
Contributor Author

While this appears to work fine when building the standalone stdlib, I think it will need a couple more tweaks for building the entire toolchain. I have kicked off a full build with those tweaks and will update this pull once that's built later today: hold off on review until then.

@finagolfin
Copy link
Contributor Author

finagolfin commented Nov 11, 2020

@shahmishal and @edymtt, I have pulled in the reverted commit from #34437 and a fix for that issue in a new commit, let me know what you think. As noted in my last comment, I ran into the same issue when cross-compiling the toolchain for Android and this commit e4ad8bf fixed it for me.

@@ -467,10 +467,12 @@ if(SWIFT_PATH_TO_CMARK_BUILD)
endif()
message(STATUS "")

if("${SWIFT_NATIVE_LLVM_TOOLS_PATH}" STREQUAL "")
set(SWIFT_CROSS_COMPILING FALSE)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shahmishal, I believe the only reason this was set was because SWIFT_NATIVE_LLVM_TOOLS_PATH was used to find clang in stdlib/CMakeLists.txt below. However, since that was a mistake that I tried to fix in #34437, I now use this clang path check and SWIFT_PREBUILT_CLANG here and in cmake/modules/SwiftSharedCMakeConfig.cmake instead. I believe this SWIFT_PREBUILT_CLANG is a better variable name as the clang might not just be passed in for cross-compiling, but also for natively building the standalone stdlib, as this pull was originally meant for.

@shahmishal
Copy link
Member

@swift-ci build toolchain

@shahmishal
Copy link
Member

@swift-ci test

@@ -110,7 +110,8 @@ endif()
# First extract the "version" used for Clang's resource directory.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
"${LLVM_PACKAGE_VERSION}")
if(NOT SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
if(NOT SWIFT_INCLUDE_TOOLS AND
(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER OR SWIFT_PREBUILT_CLANG))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gottesmm and @shahmishal, should this be using the passed-in prebuilt compiler's resource directory even when SWIFT_INCLUDE_TOOLS is true, ie should this be if(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER OR SWIFT_PREBUILT_CLANG) instead? This only applies when building the standalone stdlib now, but since you guys have started cross-compiling the full Mac toolchain with SWIFT_NATIVE_CLANG_TOOLS_PATH set (as do I when cross-compiling the Termux toolchain for Android), I'm not sure which resource directory should be used, the freshly built one that's now used or the one that comes with the prebuilt clang, or if it matters.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code path uses CMAKE_C_COMPILER which no longer is setup by build-script-impl now. How is this intended to work? It seems a bit confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still using it, it may help if you look at all three commits in this pull together.

I agree that all the CMAKE_C_COMPILER invocations are confusing, as I explained in #33675 a couple weeks ago (see that original comment for the links too):

The build-script requires a host_cc to be set,
which it looks up in the path or can be passed
in with --host-cc and then it sets CMAKE_{C,CXX}_COMPILER
for all CMake invocations with that host clang/clang++.
Then, several build products override that with
another CMAKE_{C,CXX}_COMPILER invocation,
either set to the freshly built Swift clang or native_clang_tools_path, #32922.

On top of this, you've now added a third CMAKE_{C,CXX}_COMPILER
invocation for all build-script-impl CMake invocations,
including when compiling CMark, LLVM, and Swift.

I'm only removing that third invocation he added in this pull, CMAKE_C_COMPILER is still set for the stdlib using SWIFT_NATIVE_CLANG_TOOLS_PATH in stdlib/CMakeLists.txt in this pull.

set(SWIFT_PREBUILT_CLANG FALSE)
else()
set(SWIFT_PREBUILT_CLANG TRUE)
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to prefer this over just using standard CMAKE_C{,XX}_COMPILER?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because the compiler and stdlib are built using potentially three clang compilers: the --host-cc is used to build a native Swift compiler, while the stdlib can also be built with either a freshly built Swift-forked clang that is usually built alongside this repo or a prebuilt clang that is passed in through --native-clang-tools-path. This new variable and SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER determine which of those three possible clangs to use when building the C++ portions of the stdlib.

@@ -110,7 +110,8 @@ endif()
# First extract the "version" used for Clang's resource directory.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
"${LLVM_PACKAGE_VERSION}")
if(NOT SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
if(NOT SWIFT_INCLUDE_TOOLS AND
(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER OR SWIFT_PREBUILT_CLANG))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code path uses CMAKE_C_COMPILER which no longer is setup by build-script-impl now. How is this intended to work? It seems a bit confusing.

@swift-ci
Copy link
Collaborator

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - e4ad8bffb24ee3fbcb036de09bf7b6aa7296639d

Install command
tar zxf swift-PR-34628-492-ubuntu16.04.tar.gz
More info

@finagolfin
Copy link
Contributor Author

All CI passes except for the Mac toolchain build, which fails when it tries to cross-compile the swift-frontend for Mac arm64 and then seemingly run that arm64 binary on the Mac x86_64 host:

25273:FAILED: bin/swift-frontend 
25274-: && /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -gline-tables-only -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Werror=switch -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -O2  -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -target arm64-apple-macosx10.9 -Xlinker -dead_strip tools/driver/CMakeFiles/swift-frontend.dir/driver.cpp.o tools/driver/CMakeFiles/swift-frontend.dir/autolink_extract_main.cpp.o tools/driver/CMakeFiles/swift-frontend.dir/modulewrap_main.cpp.o tools/driver/CMakeFiles/swift-frontend.dir/swift_indent_main.cpp.o tools/driver/CMakeFiles/swift-frontend.dir/swift_symbolgraph_extract_main.cpp.o -o bin/swift-frontend -L/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/./lib   -L/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./lib/swift/macosx -Wl,-rpath,@executable_path/../lib/swift/macosx  lib/libswiftDriver.a  lib/libswiftFrontendTool.a  lib/libswiftSymbolGraphGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMBitstreamReader.a  lib/libswiftImmediate.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMCJIT.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMOrcJIT.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMExecutionEngine.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMRuntimeDyld.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMOrcError.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMJITLink.a  lib/libswiftPrintAsObjC.a  lib/libswiftFrontend.a  lib/libswiftIDE.a  lib/libswiftIndex.a  lib/libswiftMigrator.a  lib/libswiftFrontend.a  lib/libswiftIDE.a  lib/libswiftIndex.a  lib/libswiftMigrator.a  lib/libswiftIRGen.a  lib/libswiftTBDGen.a  lib/libswiftIRGen.a  lib/libswiftTBDGen.a  lib/libswiftSILGen.a  lib/libswiftSILOptimizer.a  lib/libswiftLLVMPasses.a  lib/libswiftLocalization.a  lib/libswiftDriver.a  lib/libswiftOption.a  lib/libswiftSerialization.a  lib/libswiftSIL.a  lib/libswiftSema.a  lib/libswiftSerialization.a  lib/libswiftSIL.a  lib/libswiftSema.a  lib/libswiftClangImporter.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangDependencyScanning.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangTooling.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangToolingRefactor.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangToolingRefactoring.a  lib/libswiftParse.a  lib/libswiftSyntaxParse.a  lib/libswiftParse.a  lib/libswiftSyntaxParse.a  lib/libswiftAST.a  lib/libswiftBasic.a  lib/libswiftDemangling.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMX86CodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMX86AsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMX86Desc.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMX86Disassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMX86Info.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMARMCodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMARMAsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMARMDisassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMARMDesc.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMARMInfo.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMARMUtils.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAArch64CodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMCFGuard.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAArch64AsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAArch64Disassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAArch64Desc.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAArch64Info.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAArch64Utils.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMPowerPCCodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMPowerPCAsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMPowerPCDesc.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMPowerPCDisassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMPowerPCInfo.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSystemZCodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSystemZAsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSystemZDisassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSystemZDesc.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSystemZInfo.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMipsCodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAsmPrinter.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMDebugInfoDWARF.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMGlobalISel.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSelectionDAG.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMipsAsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMipsDesc.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMipsDisassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMCDisassembler.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMipsInfo.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangFrontendTool.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangCodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMCoverage.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMLTO.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMObjCARCOpts.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMCodeGen.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMExtensions.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMPasses.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMCoroutines.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMipo.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMBitWriter.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMIRReader.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAsmParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMInstrumentation.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMLinker.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMTarget.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMScalarOpts.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAggressiveInstCombine.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMInstCombine.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMVectorize.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangARCMigrate.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangStaticAnalyzerFrontend.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangStaticAnalyzerCheckers.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangStaticAnalyzerCore.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangCrossTU.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangIndex.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangFormat.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangToolingInclusions.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangToolingCore.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangRewriteFrontend.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangFrontend.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangDriver.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMOption.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangParse.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangSerialization.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangSema.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangAPINotes.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangAnalysis.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangASTMatchers.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangEdit.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangRewrite.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangAST.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMFrontendOpenMP.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMTransformUtils.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMAnalysis.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMProfileData.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMObject.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMBitReader.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMCParser.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMTextAPI.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangLex.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libclangBasic.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMMC.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMDebugInfoCodeView.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMDebugInfoMSF.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMCore.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMRemarks.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMBitstreamReader.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMBinaryFormat.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMSupport.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/llvm-macosx-arm64/lib/libLLVMDemangle.a  -lz  -lcurses  -lm  lib/libswiftSyntax.a  lib/libswiftMarkup.a  /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/cmark-macosx-arm64/src/libcmark.a && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/tools/driver && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/dummyInput.swift && /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swift-frontend -emit-supported-features -o /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/SupportedFeatures.json /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/dummyInput.swift && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/bin && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend swift && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/bin && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend swiftc && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/bin && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend swift-indent && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/bin && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend swift-symbolgraph-extract && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/bin && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend swift-autolink-extract && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/tools/driver && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swift && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/tools/driver && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swiftc && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/tools/driver && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swift-symbolgraph-extract && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/tools/driver && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swift-autolink-extract && cd /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/tools/driver && /Applications/CMake.app/Contents/bin/cmake -E create_symlink swift-frontend /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swift-indent
25275-/bin/sh: /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/swift-macosx-arm64/./bin/swift-frontend: Bad CPU type in executable

Since this pull is mostly about setting the clang used, that is most likely an external error unrelated to this pull.

@edymtt
Copy link
Contributor

edymtt commented Nov 11, 2020

The toolchain compilation error will be addressed by either

#34686

or

#34685

We should retest the generation of the toolchains once one of those is in

@edymtt
Copy link
Contributor

edymtt commented Nov 11, 2020

@swift-ci build toolchain

@swift-ci
Copy link
Collaborator

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - e4ad8bffb24ee3fbcb036de09bf7b6aa7296639d

Install command
tar zxf swift-PR-34628-495-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Collaborator

macOS Toolchain
Download Toolchain
Git Sha - e4ad8bffb24ee3fbcb036de09bf7b6aa7296639d

Install command
tar -zxf swift-PR-34628-768-osx.tar.gz --directory ~/

@finagolfin
Copy link
Contributor Author

Ping, can someone run the CI and toolchain on this again?

@shahmishal
Copy link
Member

@swift-ci build toolchain

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 1, 2020

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - e4ad8bffb24ee3fbcb036de09bf7b6aa7296639d

Install command
tar zxf swift-PR-34628-508-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 1, 2020

macOS Toolchain
Download Toolchain
Git Sha - e4ad8bffb24ee3fbcb036de09bf7b6aa7296639d

Install command
tar -zxf swift-PR-34628-796-osx.tar.gz --directory ~/

@finagolfin
Copy link
Contributor Author

@edymtt or @shahmishal, could one of you re-run the CI and merge this? The only remaining review question was whether one block should be expanded, but Michael told me he probably won't get to answering that this week, so we can always add that in a later pull if wanted.

@@ -167,8 +167,11 @@ def install_toolchain_path(self, host_target):
"""toolchain_path() -> string

Returns the path to the toolchain that is being created as part of this
build.
build, or to a native prebuilt toolchain that was passed in.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased and updated this comment.

…-path flags into the Python build-script""

Also, fix two places where the LLVM path was wrongly employed to set up clang,
and use the Swift path in install_toolchain_path().
@finagolfin
Copy link
Contributor Author

Ping, CI just needs to be run again and this is ready to go.

@finagolfin
Copy link
Contributor Author

@varungandhi-apple, mind running the CI again here? The previous pass was before Thanksgiving.

@varungandhi-apple
Copy link
Contributor

@swift-ci build toolchain

@swift-ci
Copy link
Collaborator

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 934823a

Install command
tar zxf swift-PR-34628-516-ubuntu16.04.tar.gz
More info

@finagolfin
Copy link
Contributor Author

Mac toolchain build fails with some error about not being able to lipo two dylibs that have the same architecture, seems unrelated.

@finagolfin
Copy link
Contributor Author

Ping, just needs the CI run again.

@varungandhi-apple
Copy link
Contributor

@swift-ci build toolchain

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 934823a

Install command
tar zxf swift-PR-34628-517-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

macOS Toolchain
Download Toolchain
Git Sha - 934823a

Install command
tar -zxf swift-PR-34628-816-osx.tar.gz --directory ~/

@varungandhi-apple
Copy link
Contributor

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 186717f into apple:main Jan 6, 2021
@finagolfin
Copy link
Contributor Author

Thanks for finally getting this in.

@finagolfin finagolfin deleted the native-clang branch January 7, 2021 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants