mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-02 02:17:44 +03:00
build(grammar): remove -fPIC
flag from windows build (#13169)
Even though there is a check for `is_like_msvc`, when setting `CXX` to `clang++` this will miss that check and try to use `-fPIC`, which is an invlaid flag for the target.
This commit is contained in:
parent
6bedca8064
commit
8ad6e53b1f
1 changed files with 7 additions and 2 deletions
|
@ -496,9 +496,11 @@ fn build_tree_sitter_library(
|
||||||
.arg("/link")
|
.arg("/link")
|
||||||
.arg(format!("/out:{}", library_path.to_str().unwrap()));
|
.arg(format!("/out:{}", library_path.to_str().unwrap()));
|
||||||
} else {
|
} else {
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
command.arg("-fPIC");
|
||||||
|
|
||||||
command
|
command
|
||||||
.arg("-shared")
|
.arg("-shared")
|
||||||
.arg("-fPIC")
|
|
||||||
.arg("-fno-exceptions")
|
.arg("-fno-exceptions")
|
||||||
.arg("-I")
|
.arg("-I")
|
||||||
.arg(header_path)
|
.arg(header_path)
|
||||||
|
@ -517,8 +519,11 @@ fn build_tree_sitter_library(
|
||||||
cpp_command.args(compiler.args());
|
cpp_command.args(compiler.args());
|
||||||
let object_file =
|
let object_file =
|
||||||
library_path.with_file_name(format!("{}_scanner.o", &grammar.grammar_id));
|
library_path.with_file_name(format!("{}_scanner.o", &grammar.grammar_id));
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
cpp_command.arg("-fPIC");
|
||||||
|
|
||||||
cpp_command
|
cpp_command
|
||||||
.arg("-fPIC")
|
|
||||||
.arg("-fno-exceptions")
|
.arg("-fno-exceptions")
|
||||||
.arg("-I")
|
.arg("-I")
|
||||||
.arg(header_path)
|
.arg(header_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue