Comments (1)
So, the best fix I found so far is to force libCYaml.a
to be built as a fat binary with both arm64 and x86_64 inside the Yams repo by adding
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
at the top of Sources/CYaml/CMakeLists.txt
.
Without it generated build.ninja
for CYaml sources will contain -arch arm64
flag and results in a arm64 binary when x86_64 is expected, even though we explicitly pass -DCMAKE_C_FLAGS=-target arm64-apple-macosx10.15
to cmake.🤔
This is a workaround unblockes me on building the swift toolchain on M1, but we need a better fix somewhere in build-script-helper.py
, because current CMAKE_C_FLAGS
it passes isn't enough to convince cmake to generate right flags for libCYaml.a
. I am no expert in cmake, so idk how to do this.
@edymtt Can you take a look at this problem, it currently blocks toolchain build on M1 macs.
It is probably one line fix here, but I cannot add CMAKE_OSX_ARCHITECTURES since Yams has Swift sources as well and cmake doesn't allow using it.
from swift-driver.
Related Issues (20)
- Hardcoded .exe for tools in WindowsToolchain.swift
- Driver diagnostics (such as remarks and errors) don't obey `-parseable-output` HOT 7
- SwiftDriver compilation error: com.apple.xcode.tools.swift.compiler is not absolute HOT 23
- Group CLI options for easier navigation HOT 1
- Cargo Termizi
- Crash due to an assertion in libswiftCore
- Xcode 14.3 RC 2 (14E222b) not pass '-strict-implicit-module-context' flag to swift-frontend
- `Process.findExecutable(arguments[0])` gives an unexpected result HOT 5
- Windows builds broken when querying target-info from libSwiftScan HOT 2
- Swift Potentially Uses the Wrong Swift Driver HOT 15
- "swift build" command duplicates error messages HOT 8
- iOS get error Dependency for P1: Debug:SwiftDriver Compilation Requirements app normal arm64 com.apple.xcode.tools.swift.compiler is not absolute
- swift help build doesn't work when it's documented to
- Test suite broken on Windows due to CAS HOT 1
- SPM doesn't enumerate source files properly in different configurations HOT 6
- tests crash on windows HOT 1
- `swift run` usage suggestion should be fixed HOT 1
- Program is several times slower when compiled with swiftc than when compiled with XCode due to retain&release calls HOT 1
- “swift ./-” does the same as “swift -” HOT 5
- This driver no longer looks in a passed-in `-sdk` for the Swift modules and libraries HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-driver.