-
Notifications
You must be signed in to change notification settings - Fork 6
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
Test m1 mac #14
Draft
krisukox
wants to merge
65
commits into
master
Choose a base branch
from
krisukox/llvm-hermetic-toolchains-m1-mac
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Test m1 mac #14
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
3e86c73
Test m1 mac
krisukox f44abed
Fix
krisukox 6a66387
Test
krisukox e52c8f6
Test
krisukox 0461e29
Try default
krisukox 056c372
Test
krisukox ced2c00
Test
krisukox 9e78882
Try fix
krisukox 52ff640
Test
krisukox 706c0d5
Single branch
krisukox f720a7b
Test
krisukox b19f937
Fix
krisukox 69118c0
Test
krisukox 9cfc6b0
Test
krisukox 56c9941
Test
krisukox a40c20f
Try 15.0.0
krisukox 97e4ccd
Build all needed components
krisukox 1435d95
Disable lld
krisukox 9168f92
Try enable lld
krisukox 22fcbb9
Build only lld
krisukox 8205a31
Build only stage2 lld
krisukox 96676d3
Try with clang
krisukox 1972468
Fix
krisukox ea977d8
Try 15
krisukox 0b24986
Fix
krisukox 1fd80c2
Try older
krisukox 274b02d
Try older
krisukox ca4ac5d
Try 14.0.0-rc1
krisukox 3b942c2
Try merge base
krisukox 0fa9c0e
Test
krisukox 0c92502
Test
krisukox 208c98d
Test
krisukox b4b3297
Test
krisukox 22e0b84
Test
krisukox 8cbf931
Test
krisukox 1bdd479
Test
krisukox 2b751cd
Test
krisukox 027dd4e
Test
krisukox a919786
Test
krisukox 0961d13
Test
krisukox 2b01068
Try patch
krisukox ed2b525
Fix
krisukox c881964
Build all components
krisukox d218742
Test tar
krisukox 7253a51
Fix
krisukox 2b24def
Fix
krisukox e471201
Fix
krisukox dd4b391
Try shortert stage2
krisukox b6e73b6
Try shorter stage1
krisukox cf9ebcf
Fix
krisukox 11a4df9
Build 15.0.0 without lld
krisukox 8295e70
build 14.0.0
krisukox bd273a6
Make 2 stage shorter
krisukox e65dce1
Enable more components
krisukox 3cc16ed
Enable runtimes
krisukox 583a793
Disable clang-tidy
krisukox 95d33f2
get bug fixes
jungleraptor ca45c05
try disabling arch flag
jungleraptor 7b6c8df
upload build to s3
jungleraptor 4a11a01
fix
jungleraptor 5c19499
try again
jungleraptor c371266
one more time
jungleraptor b4b0f2a
add another clean
jungleraptor 55b1d72
try to build clang tools
jungleraptor 2aaa362
skip clang tidy
jungleraptor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ubuntu:jammy | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y \ | ||
build-essential \ | ||
clang-14 \ | ||
clang++-14 \ | ||
cmake \ | ||
libc6-dev-i386 \ | ||
python3-pip \ | ||
python3-distutils \ | ||
vim \ | ||
ninja-build \ | ||
git |
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,85 @@ | ||
#!groovy | ||
|
||
/** | ||
* This Jenkinsfile will only work in a Swift Navigation build/CI environment, as it uses | ||
* non-public docker images and pipeline libraries. | ||
*/ | ||
|
||
// Use 'ci-jenkins@somebranch' to pull shared lib from a different branch than the default. | ||
// Default is configured in Jenkins and should be from "stable" tag. | ||
@Library("ci-jenkins") import com.swiftnav.ci.* | ||
|
||
def context = new Context(context: this) | ||
context.setRepo("swift-toolchains") | ||
|
||
/** | ||
* - Mount the refrepo to keep git operations functional on a repo that uses ref-repo during clone | ||
**/ | ||
String dockerMountArgs = "-v /mnt/efs/refrepo:/mnt/efs/refrepo" | ||
|
||
pipeline { | ||
// Override agent in each stage to make sure we don't share containers among stages. | ||
agent any | ||
options { | ||
// Make sure job aborts after 2 hours if hanging. | ||
timeout(time: 4, unit: 'HOURS') | ||
timestamps() | ||
// Keep builds for 7 days. | ||
buildDiscarder(logRotator(daysToKeepStr: '7')) | ||
} | ||
|
||
stages { | ||
stage('Build') { | ||
parallel { | ||
stage('llvm aarch64 darwin') { | ||
agent { | ||
node('macos-arm64') | ||
} | ||
steps { | ||
sh(''' | ||
git clone https://github.com/llvm/llvm-project --branch=llvmorg-14.0.0 --single-branch | ||
cd llvm-project | ||
|
||
mkdir build | ||
cd build | ||
|
||
cmake -GNinja ../llvm \ | ||
-DCMAKE_INSTALL_PREFIX=../out/ \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ | ||
-DCMAKE_OSX_ARCHITECTURES='arm64' \ | ||
-DCMAKE_C_COMPILER=`which clang` \ | ||
-DCMAKE_CXX_COMPILER=`which clang++` \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=../out \ | ||
-DLLVM_ENABLE_PROJECTS='clang' \ | ||
-DLLVM_DISTRIBUTION_COMPONENTS='clang' \ | ||
-C ../../llvm/Apple-stage1.cmake | ||
ninja help | ||
ninja stage2-install-distribution | ||
''') | ||
uploadDistribution("clang+llvm-14.0.0-arm64-apple-darwin", context) | ||
} | ||
post { | ||
cleanup { | ||
cleanWs() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
cleanWs() | ||
} | ||
} | ||
} | ||
|
||
def uploadDistribution(name, context) { | ||
sh(""" | ||
mkdir -p tar/${name}/ | ||
cp -rH llvm-project/out/* tar/${name}/ | ||
""") | ||
tar(file: "${name}.tar.gz", dir: 'tar', archive: true) | ||
} |
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,62 @@ | ||
# This file sets up a CMakeCache for Apple-style bootstrap builds. It can be | ||
# used on any Darwin system to approximate Apple Clang builds. | ||
|
||
if($ENV{DT_TOOLCHAIN_DIR}) | ||
set(CMAKE_INSTALL_PREFIX $ENV{DT_TOOLCHAIN_DIR}/usr/) | ||
else() | ||
set(CMAKE_INSTALL_PREFIX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.toolchain/usr/) | ||
endif() | ||
|
||
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra" CACHE STRING "") | ||
|
||
set(LLVM_TARGETS_TO_BUILD AArch64 CACHE STRING "") | ||
set(CLANG_VENDOR Apple CACHE STRING "") | ||
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") | ||
set(LLVM_INCLUDE_UTILS OFF CACHE BOOL "") | ||
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") | ||
set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(COMPILER_RT_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "") | ||
set(CMAKE_MACOSX_RPATH ON CACHE BOOL "") | ||
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "") | ||
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") | ||
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "") | ||
set(CLANG_SPAWN_CC1 ON CACHE BOOL "") | ||
set(CLANG_BOOTSTRAP_PASSTHROUGH | ||
CMAKE_OSX_ARCHITECTURES | ||
CACHE STRING "") | ||
|
||
# Disabling embedded darwin compiler-rt on stage1 builds is required because we | ||
# don't build stage1 to support arm code generation. | ||
set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "") | ||
set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "") | ||
set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "") | ||
|
||
set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") | ||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") | ||
|
||
set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") | ||
set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "") | ||
|
||
set(CLANG_BOOTSTRAP_TARGETS | ||
generate-order-file | ||
check-all | ||
check-llvm | ||
check-clang | ||
llvm-config | ||
test-suite | ||
test-depends | ||
llvm-test-depends | ||
clang-test-depends | ||
distribution | ||
install-distribution | ||
install-xcode-toolchain | ||
install-distribution-toolchain | ||
clang CACHE STRING "") | ||
|
||
#bootstrap | ||
set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") | ||
set(CLANG_BOOTSTRAP_CMAKE_ARGS | ||
-C ${CMAKE_CURRENT_LIST_DIR}/Apple-stage2.cmake | ||
CACHE STRING "") |
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,6 @@ | ||
# This file sets up a CMakeCache for Apple-style stage2 ThinLTO bootstrap. It is | ||
# specified by the stage1 build. | ||
|
||
|
||
set(LLVM_ENABLE_LTO THIN CACHE BOOL "") | ||
include(${CMAKE_CURRENT_LIST_DIR}/Apple-stage2.cmake) |
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,46 @@ | ||
# This file sets up a CMakeCache for Apple-style stage2 bootstrap. It is | ||
# specified by the stage1 build. | ||
|
||
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra" CACHE STRING "") | ||
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") | ||
|
||
set(LLVM_TARGETS_TO_BUILD AArch64 CACHE STRING "") | ||
set(PACKAGE_VENDOR Apple CACHE STRING "") | ||
|
||
set(CMAKE_MACOSX_RPATH ON CACHE BOOL "") | ||
|
||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") | ||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "") | ||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "") | ||
|
||
# Generating Xcode toolchains is useful for developers wanting to build and use | ||
# clang without installing over existing tools. | ||
# set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "") | ||
|
||
# setup toolchain | ||
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") | ||
set(LLVM_TOOLCHAIN_TOOLS | ||
llvm-ar | ||
llvm-cov | ||
llvm-dwp | ||
llvm-nm | ||
llvm-objcopy | ||
llvm-objdump | ||
llvm-profdata | ||
llvm-strip | ||
llvm-symbolizer | ||
CACHE STRING "") | ||
|
||
set(LLVM_DISTRIBUTION_COMPONENTS | ||
clang | ||
clang-format | ||
builtins | ||
runtimes | ||
clang-resource-headers | ||
# clang-tidy | ||
${LLVM_TOOLCHAIN_TOOLS} | ||
CACHE STRING "") | ||
|
||
# test args | ||
|
||
set(LLVM_LIT_ARGS "--xunit-xml-output=testresults.xunit.xml -v" CACHE STRING "") |
24 changes: 24 additions & 0 deletions
24
patches/0003-Add-missing-include-diagnosed-by-the-modules-build.patch
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,24 @@ | ||
From 4904e853130825d1c6fa93faf289e1ccf2f01c68 Mon Sep 17 00:00:00 2001 | ||
From: Adrian Prantl <[email protected]> | ||
Date: Wed, 2 Feb 2022 09:08:11 -0800 | ||
Subject: [PATCH] Add missing include diagnosed by the modules build. | ||
|
||
--- | ||
llvm/include/llvm/Transforms/InstCombine/InstCombine.h | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h | ||
index 6dee38c83b36..35a3a8c3218b 100644 | ||
--- a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h | ||
+++ b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h | ||
@@ -18,6 +18,7 @@ | ||
|
||
#include "llvm/IR/Function.h" | ||
#include "llvm/IR/PassManager.h" | ||
+#include "llvm/Pass.h" | ||
|
||
#define DEBUG_TYPE "instcombine" | ||
#include "llvm/Transforms/Utils/InstructionWorklist.h" | ||
-- | ||
2.34.1 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry for commenting on a draft, but do we need this if we're building on the macOS nodes?
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.
No, we don't need it. I took it from my Linux PR and forgot to remove it.