Comments (2)
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.
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)
- https://vlang.io/ REPL example doesn't work HOT 1
- Provide easier installer like Rust HOT 5
- fmt: a regression was introduced in #22025 (vfmt struct init) HOT 3
- Precision format ignored in string interpolation HOT 4
- sum types should have a default 0 value for the first type mentioned in the list of types. HOT 4
- Passing a map to a generic argument changes a key value from int to an empty string HOT 1
- Module resolution depends on working directory HOT 3
- Free an optional structure HOT 7
- C error when comparing array to nil
- Compiler error when trying to convey a variadic argument set HOT 3
- Invalid conversion from camel to snake string with numbers HOT 5
- C error when returning a fixed-size array (NOTE: initialization with a for loop doesn't help) HOT 2
- C error when initializing fixed-size array HOT 2
- Returning fixed size arrays is still making C errors, even with the size being a normal int HOT 2
- C error - multiple returns values and fixed arrays
- Issue with Sokol and STBI openning images.
- cgen: Free optional string
- const name shadowing HOT 3
- -autofree fails on if statement containing strings
- rand.pcg32 breaks -autofree
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 v.