ci(workflows): added RUSTFLAGS configuration for x86-64-v3 CPU optimization in CI and native builds
- Added RUSTFLAGS environment variable configuration to CI workflow for x86-64-v3 CPU optimization across multiple build jobs. - Added per-matrix rustflags configuration for native builds on x64 platforms (Linux, macOS Intel, Windows). - Updated build-native script to default to native CPU optimization for local builds when not cross-compiling.
This commit is contained in:
@@ -15,6 +15,11 @@ const isCrossCompile =
|
||||
targetPlatform !== process.platform ||
|
||||
targetArch !== process.arch;
|
||||
|
||||
// Default to native CPU optimization for local builds; CI overrides via RUSTFLAGS env
|
||||
if (!isCrossCompile && !Bun.env.RUSTFLAGS) {
|
||||
Bun.env.RUSTFLAGS = "-C target-cpu=native";
|
||||
}
|
||||
|
||||
async function cleanupStaleTemps(dir: string): Promise<void> {
|
||||
try {
|
||||
const entries = await fs.readdir(dir);
|
||||
|
||||
Reference in New Issue
Block a user