Comments (3)
currently for x86_64 targets we set
-mcpu=pentium4
.
This isn't true? We are only using pentium4
for i686
Linux target.
Lines 1017 to 1022 in 402ddac
I think we should just go with solution 1: parse RUSTFLAGS
to get target-cpu
and target-features
, then translate them to zig -mcpu
flag.
from cargo-zigbuild.
currently for x86_64 targets we set
-mcpu=pentium4
.This isn't true? We are only using
pentium4
fori686
Linux target.Lines 1017 to 1022 in 402ddac
I think we should just go with solution 1: parse
RUSTFLAGS
to gettarget-cpu
andtarget-features
, then translate them to zig-mcpu
flag.
Good idea! In this way Rust land and C land uses the same CPU features, looks better.
from cargo-zigbuild.
After some investigation I'm now worrying about one case:
cargo-zigbuild zig cc
as a compiler wrapper, now changes behavior when there are environmental changes (e.g. RUSTFLAGS). This actually conflicts with other compiler wrappers such as ccache, where they expect the compilers (and compiler wrappers) to produce exactly the same output using the same input files.
TL;DR, what will happen is that, for some crates that tries to invoke ccache internally (like rust-rocksdb), when user changes RUSTFLAGS, rebuild will not happen due to ccache not invalidated.
As an alternative, we could parse the RUSTFLAGS
(from config files and env variables) when invoking cargo-zigbuild zigbuild
, and then passing it explicitly as part of the compiler wrapper. This may be friendly with these compiler wrappers.
from cargo-zigbuild.
Related Issues (20)
- i use x86 macos with zigbuild buid aarch64-apple-darwin , but strip will cause exe error
- How to pass -fno-sanitize=undefined to `zig cc`?
- Version bump from Rust 1.73 to Rust 1.75 for `Dockerfile`
- cargo-zigbuild doesn't seem to utilize cargo config HOT 1
- `universal2-apple-darwin` panics under workspace HOT 2
- `cargo zigbuild` doesn't support static glibc builds with an explicit `--target` HOT 12
- Running `cargo doc` with `cargo-zigbuild` HOT 2
- CMake error on FLTK HOT 2
- ccache is always invalidated HOT 3
- cargo-zigbuild test doesn't pass arguments through properly HOT 2
- Improve cargo-zigbuild zig performance HOT 2
- How to compile on Windows HOT 1
- zig cc with undefined symbols when building opencv-rs HOT 2
- Missing Exports from Windows GNU Target HOT 1
- unable to find dynamic system library 'atomic' HOT 3
- invalid instruction: [email protected]: strd r4,[sp,#0] HOT 1
- Linking is not working correctly HOT 1
- Compiling libgit2 on glibc 2.17 stat error HOT 2
- cargo-zigbuild 0.19.0 test failure HOT 4
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 cargo-zigbuild.