Code Monkey home page Code Monkey logo

Comments (2)

mustafaquraish avatar mustafaquraish commented on August 18, 2024 1

Actually, it was a simple enough fix. I've updated the code to use clang for linking on macOS, and I've also added a test runner for macOS 11 to make sure we don't regress. If you just checkout the newest master, it should work fine now on your machine. Thanks again for taking the time to point out the bug!

from cup.

mustafaquraish avatar mustafaquraish commented on August 18, 2024

The issue here is that the first round of compilation is happening successfully with the flags you passed in, but internally, the bootstrap compiler also calls ld to link the new executable, but the flags are not being passed in there unfortunately. For now, you can just link build/cupcc.o manually, and edit compiler/main.cup to include the new flags to the ld call, and then run compile a newer version of the compiler.

Perhaps the better fix here might be to just use clang for linking as opposed to ld, and it will pass all the correct arguments to the linker call. Changing the linking step to clang XXX.o -o XXX (in both the meta/bootstrap.sh file and compiler/main.cup) seems to do the trick for me, but I'm not sure if that might be different on your version.

Thanks for pointing this out, I didn't know there would be weird stuff with different macOS versions, I'll look into this further, and see if I can push a change to the repo within the next few days that just lets it work out of the box. I think Github Actions has macOS 11, so I might be able to test there.

It's a bit of an annoyance getting the initial workflow up, but after that it's usually fine. You can reach out on Discord if you're still interested in getting it working and want some help: mustafaq#8791

from cup.

Related Issues (8)

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.