Giter VIP home page Giter VIP logo

Comments (2)

spytheman avatar spytheman commented on September 26, 2024

Yes, it is a known problem. tcc does not yet support ARM asm blocks on macos.

The current workarounds are to either:
a) -cc clang for such programs, which is slower, but should work without other changes.
or
b) if you do not need mbedtls, but just net.http and net.ssl, pass -d use_openssl , which should work with tcc too (after installing openssl with brew).

from v.

spytheman avatar spytheman commented on September 26, 2024

Here is an example of compiling examples/fetch.v, which does use net.http:

0[07:19:44]@m1: (master) /opt/v $ ./v -showcc -d use_openssl -cc tcc -no-retry-compilation -d dynamic_boehm examples/fetch.v
> C compiler cmd: '/opt/v/thirdparty/tcc/tcc.exe' '@/tmp/v_501/fetch.01HZV160EXN887J1X6A9R7T7HZ.tmp.c.rsp'
> C compiler response file "/tmp/v_501/fetch.01HZV160EXN887J1X6A9R7T7HZ.tmp.c.rsp":
  -fwrapv -o "/opt/v/examples/fetch" -D GC_THREADS=1 -I "/opt/homebrew/Cellar/bdw-gc/8.2.4/include" -L "/opt/homebrew/Cellar/bdw-gc/8.2.4/lib" -I "/opt/v/thirdparty/legacy/include/LegacySupport" -I "/opt/v/thirdparty/stdatomic/nix" -I "/opt/homebrew/Cellar/openssl@3/3.3.0/include" -L "/opt/homebrew/Cellar/openssl@3/3.3.0/lib" "/tmp/v_501/fetch.01HZV160EXN887J1X6A9R7T7HZ.tmp.c" -std=c99 -D_DEFAULT_SOURCE -bt25 -lgc -lpthread -lssl -lcrypto
0[07:19:52]@m1: (master) /opt/v $
0[07:19:53]@m1: (master) /opt/v $

The -d dynamic_boehm is needed to get V to use the brew version of the precompiled Boehm collector, since tcc can not link to our libgc.a too.

from v.

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.