pref: pass custom -d options down to `v build-module` (fix for -usecache)

pull/7405/head^2
Delyan Angelov 2020-12-19 01:54:18 +02:00
parent 1e4b3a7b27
commit adaffd0d8e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 0 deletions

View File

@ -542,6 +542,7 @@ pub fn cc_from_string(cc_str string) CompilerType {
fn parse_define(mut prefs Preferences, define string) {
define_parts := define.split('=')
prefs.build_options << '-d $define'
if define_parts.len == 1 {
prefs.compile_defines << define
prefs.compile_defines_all << define