Skip to content

Commit 4ad6d95

Browse files
committed
Use local build when running on MinGW
Since LDFLAGS are not updated (see previous commit) we now need to use `--with-opt-dir` option to ensure local install of SQLite3 is used.
1 parent 17b6045 commit 4ad6d95

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tasks/vendor_sqlite3.rake

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ def define_sqlite_task(platform, host)
2828
end
2929

3030
# native sqlite3 compilation
31-
define_sqlite_task RUBY_PLATFORM, RbConfig::CONFIG["host"]
31+
recipe = define_sqlite_task(RUBY_PLATFORM, RbConfig::CONFIG["host"])
32+
33+
# force compilation of sqlite3 when working natively under MinGW
34+
if RUBY_PLATFORM =~ /mingw/
35+
RUBY_EXTENSION.config_options << "--with-opt-dir=#{recipe.path}"
36+
37+
Rake::Task['compile'].prerequisites.unshift "ports:sqlite3:#{RUBY_PLATFORM}"
38+
end
3239

3340
# trick to test local compilation of sqlite3
3441
if ENV["USE_MINI_PORTILE"] == "true"
@@ -42,11 +49,6 @@ if ENV["USE_MINI_PORTILE"] == "true"
4249
Rake::Task["compile"].prerequisites.unshift "ports:sqlite3:#{RUBY_PLATFORM}"
4350
end
4451

45-
# force compilation of sqlite3 when working natively under MinGW
46-
if RUBY_PLATFORM =~ /mingw/
47-
Rake::Task['compile'].prerequisites.unshift "ports:sqlite3:#{RUBY_PLATFORM}"
48-
end
49-
5052
# iterate over all cross-compilation platforms and define the proper
5153
# sqlite3 recipe for it.
5254
if RUBY_EXTENSION.cross_compile

0 commit comments

Comments
 (0)