Skip to content

Commit 717e9bc

Browse files
author
Juliette Pretot
committed
Patch the ring build script to enable builds from source code
Turns out that ring includes pre-generated objects in cargo releases. It uses logic in its build scripts to determine whether the build is from a version published on cargo, or from source code. This logic is somewhat naively implemented by checking for the absence of a `.git` directory. This check falesly leads ring to believe it is building from a version published on crates.io, and fails when it tries to include the pregenerated files not present in the source code. To build from source code we must patch this flag.
1 parent e38fdc9 commit 717e9bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/ring/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fn ring_build_rs_main() {
330330
// If `.git` doesn't exist then assume that this is a packaged build where
331331
// we want to optimize for minimizing the build tools required: No Perl,
332332
// no nasm, etc.
333-
let use_pregenerated = !is_git;
333+
let use_pregenerated = false;
334334

335335
// During local development, force warnings in non-Rust code to be treated
336336
// as errors. Since warnings are highly compiler-dependent and compilers

0 commit comments

Comments
 (0)