diff --git a/cli/loader/src/lib.rs b/cli/loader/src/lib.rs index e71001a4..2c268347 100644 --- a/cli/loader/src/lib.rs +++ b/cli/loader/src/lib.rs @@ -395,7 +395,6 @@ impl Loader { } else { command .arg("-shared") - .arg("-fPIC") .arg("-fno-exceptions") .arg("-g") .arg("-I") @@ -403,6 +402,10 @@ impl Loader { .arg("-o") .arg(&library_path); + if !cfg!(windows) { + command.arg("-fPIC"); + } + if self.debug_build { command.arg("-O0"); } else {