Backed out changeset 2e560a9e4bcf (bug 1551690) for build bustages

This commit is contained in:
Coroiu Cristina 2019-05-21 03:51:56 +03:00
Родитель e454136cb1
Коммит c4361da40f
8 изменённых файлов: 21 добавлений и 28 удалений

Просмотреть файл

@ -294,7 +294,7 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
"-DCMAKE_OSX_ARCHITECTURES=x86_64",
"-DDARWIN_osx_ARCHS=x86_64",
"-DDARWIN_osx_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
"-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin"
"-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-darwin11"
]
return cmake_args
@ -786,7 +786,7 @@ if __name__ == "__main__":
extra_cxxflags = ["-stdlib=libc++"]
extra_cxxflags2 = ["-stdlib=libc++"]
extra_flags = ["-target", "x86_64-apple-darwin", "-mlinker-version=137",
extra_flags = ["-target", "x86_64-darwin11", "-mlinker-version=137",
"-B", "%s/bin" % os.getenv("CROSS_CCTOOLS_PATH"),
"-isysroot", os.getenv("CROSS_SYSROOT"),
# technically the sysroot flag there should be enough to deduce this,

Просмотреть файл

@ -16,9 +16,9 @@
"cc": "/builds/worker/workspace/build/src/clang/bin/clang",
"cxx": "/builds/worker/workspace/build/src/clang/bin/clang++",
"as": "/builds/worker/workspace/build/src/clang/bin/clang",
"ar": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin-ar",
"ranlib": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin-ranlib",
"libtool": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin-libtool",
"ar": "/builds/worker/workspace/build/src/cctools/bin/x86_64-darwin11-ar",
"ranlib": "/builds/worker/workspace/build/src/cctools/bin/x86_64-darwin11-ranlib",
"libtool": "/builds/worker/workspace/build/src/cctools/bin/x86_64-darwin11-libtool",
"ld": "/builds/worker/workspace/build/src/clang/bin/clang",
"patches": [
"static-llvm-symbolizer.patch",

Просмотреть файл

@ -16,9 +16,9 @@
"cc": "/builds/worker/workspace/build/src/clang/bin/clang",
"cxx": "/builds/worker/workspace/build/src/clang/bin/clang++",
"as": "/builds/worker/workspace/build/src/clang/bin/clang",
"ar": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin-ar",
"ranlib": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin-ranlib",
"libtool": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin-libtool",
"ar": "/builds/worker/workspace/build/src/cctools/bin/x86_64-darwin11-ar",
"ranlib": "/builds/worker/workspace/build/src/cctools/bin/x86_64-darwin11-ranlib",
"libtool": "/builds/worker/workspace/build/src/cctools/bin/x86_64-darwin11-libtool",
"ld": "/builds/worker/workspace/build/src/clang/bin/clang",
"patches": [
"clang-tidy-8.patch"

Просмотреть файл

@ -1,4 +1,4 @@
Add `-target x86_64-apple-darwin' to the compiler-rt overridden CFLAGS
Add `-target x86_64-darwin11' to the compiler-rt overridden CFLAGS
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 28d398672..aac68bf36 100644
@ -9,7 +9,7 @@ index 28d398672..aac68bf36 100644
set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes)
- set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
+ set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target x86_64-apple-darwin -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
+ set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target x86_64-darwin11 -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
set(CMAKE_C_FLAGS "")
set(CMAKE_CXX_FLAGS "")
set(CMAKE_ASM_FLAGS "")

Просмотреть файл

@ -37,7 +37,7 @@ export HOST_CFLAGS="-g"
export HOST_CXXFLAGS="-g"
export HOST_LDFLAGS="-g"
ac_add_options --target=x86_64-apple-darwin
ac_add_options --target=x86_64-apple-darwin11
export MACOS_SDK_DIR=$CROSS_SYSROOT
export MACOS_PRIVATE_FRAMEWORKS_DIR=$CROSS_PRIVATE_FRAMEWORKS

Просмотреть файл

@ -750,15 +750,6 @@ def split_triplet(triplet, allow_unknown=False):
def bitness(cpu):
return CPU_bitness[cpu]
# Toolchains, most notably for cross compilation may use cpu-os
# prefixes. We need to be more specific about the LLVM target on Mac
# so cross-language LTO will work correctly.
if os.startswith('darwin'):
toolchain = '%s-apple-%s' % (cpu, os)
else:
toolchain='%s-%s' % (cpu, os),
return namespace(
alias=triplet,
cpu=sanitize(CPU, canonical_cpu),
@ -768,7 +759,9 @@ def split_triplet(triplet, allow_unknown=False):
endianness=sanitize(Endianness, endianness),
raw_cpu=cpu,
raw_os=os,
toolchain=toolchain,
# Toolchains, most notably for cross compilation may use cpu-os
# prefixes.
toolchain='%s-%s' % (cpu, os),
)

Просмотреть файл

@ -206,9 +206,9 @@ DEFAULT_CLANGXX = CLANGXX_3_6
def CLANG_PLATFORM(gcc_platform):
base = {
'--target=x86_64-linux-gnu': GCC_PLATFORM_X86_64_LINUX[None],
'--target=x86_64-apple-darwin11.2.0': GCC_PLATFORM_X86_64_OSX[None],
'--target=x86_64-darwin11.2.0': GCC_PLATFORM_X86_64_OSX[None],
'--target=i686-linux-gnu': GCC_PLATFORM_X86_LINUX[None],
'--target=i686-apple-darwin11.2.0': GCC_PLATFORM_X86_OSX[None],
'--target=i686-darwin11.2.0': GCC_PLATFORM_X86_OSX[None],
'--target=arm-linux-gnu': GCC_PLATFORM_ARM_LINUX[None],
}
undo_gcc_platform = {
@ -1332,10 +1332,10 @@ class OSXCrossToolchainTest(BaseToolchainTest):
def test_osx_cross(self):
self.do_toolchain_test(self.PATHS, {
'c_compiler': self.DEFAULT_CLANG_RESULT + {
'flags': ['--target=i686-apple-darwin11.2.0'],
'flags': ['--target=i686-darwin11.2.0'],
},
'cxx_compiler': self.DEFAULT_CLANGXX_RESULT + {
'flags': ['--target=i686-apple-darwin11.2.0'],
'flags': ['--target=i686-darwin11.2.0'],
},
'host_c_compiler': self.DEFAULT_CLANG_RESULT,
'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,

Просмотреть файл

@ -42,15 +42,15 @@ export CC=$CLANG_DIR/bin/clang
export CXX=$CLANG_DIR/bin/clang++
export LDFLAGS="-lpthread -Wl,-rpath-link,$CLANG_DIR/lib"
./autogen.sh
./configure --prefix=$CROSSTOOLS_BUILD_DIR --target=x86_64-apple-darwin --with-llvm-config=$CLANG_DIR/bin/llvm-config
./configure --prefix=$CROSSTOOLS_BUILD_DIR --target=x86_64-darwin11 --with-llvm-config=$CLANG_DIR/bin/llvm-config
# Build cctools
make -j `nproc --all` install
strip $CROSSTOOLS_BUILD_DIR/bin/*
# cctools-port doesn't include dsymutil but clang will need to find it.
cp $CLANG_DIR/bin/dsymutil $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-dsymutil
cp $CLANG_DIR/bin/dsymutil $CROSSTOOLS_BUILD_DIR/bin/x86_64-darwin11-dsymutil
# various build scripts based on cmake want to find `lipo` without a prefix
cp $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-lipo $CROSSTOOLS_BUILD_DIR/bin/lipo
cp $CROSSTOOLS_BUILD_DIR/bin/x86_64-darwin11-lipo $CROSSTOOLS_BUILD_DIR/bin/lipo
# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR