Skip to content

Commit 9a33623

Browse files
committed
move CMake/SwiftPM common variables into swift-common.bbclass
1 parent 4dc0249 commit 9a33623

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

classes/swift-cmake-base.bbclass

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
inherit cmake
2+
inherit swift-common
23

3-
# avoid conflicts with meta-clang
4-
TOOLCHAIN = "gcc"
5-
6-
TARGET_CC_ARCH:remove = "-mbranch-protection=standard"
7-
8-
DEPENDS:append = " swift-native libgcc gcc glibc "
4+
DEPENDS:append = " swift-native libgcc gcc glibc"
95

106
SWIFT_TARGET_NAME = "${@oe.utils.conditional('TARGET_ARCH', 'arm', 'armv7-unknown-linux-gnueabihf', '${TARGET_ARCH}-unknown-linux-gnu', d)}"
117
SWIFT_TARGET_ARCH = "${@oe.utils.conditional('TARGET_ARCH', 'arm', 'armv7', '${TARGET_ARCH}', d)}"

classes/swift-cmake.bbclass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inherit swift-cmake-base
22

3-
DEPENDS:append = "swift-stdlib libdispatch swift-foundation"
3+
DEPENDS:append = " swift-stdlib libdispatch swift-foundation"
44

55
TARGET_LDFLAGS += "-L${STAGING_DIR_TARGET}/usr/lib/swift/linux"

classes/swift-common.bbclass

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# avoid conflicts with meta-clang
2+
TOOLCHAIN = "gcc"
3+
4+
# appears to cause segfault
5+
TARGET_CC_ARCH:remove:aarch64 = "-mbranch-protection=standard"

classes/swift.bbclass

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# avoid conflicts with meta-clang
2-
TOOLCHAIN = "gcc"
3-
4-
TARGET_CC_ARCH:remove = "-mbranch-protection=standard"
1+
inherit swift-common
52

63
SWIFT_BUILD_TESTS ?= "${DEBUG_BUILD}"
74

8-
DEPENDS += "swift-native glibc gcc libgcc swift-stdlib libdispatch swift-foundation"
9-
DEPENDS += "${@oe.utils.conditional('SWIFT_BUILD_TESTS', '1', 'swift-xctest swift-testing', '', d)}"
5+
DEPENDS:append = " swift-native glibc gcc libgcc swift-stdlib libdispatch swift-foundation"
6+
DEPENDS:append = " ${@oe.utils.conditional('SWIFT_BUILD_TESTS', '1', ' swift-xctest swift-testing', '', d)}"
107

118
# Default build directory for SPM is "./.build"
129
# (see 'swift [build|package|run|test] --help')

0 commit comments

Comments
 (0)