Giter Club home page Giter Club logo

Comments (1)

azarovalex avatar azarovalex commented on September 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.