File tree 1 file changed +7
-5
lines changed
pkgs/native_toolchain_c/lib/src/cbuilder
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -85,14 +85,14 @@ class RunCBuilder {
85
85
if (compilerTool == appleClang ||
86
86
compilerTool == clang ||
87
87
compilerTool == gcc) {
88
- await runClangLike (compiler: compiler_.uri );
88
+ await runClangLike (compiler: compiler_);
89
89
return ;
90
90
}
91
91
assert (compilerTool == cl);
92
92
await runCl (compiler: compiler_);
93
93
}
94
94
95
- Future <void > runClangLike ({required Uri compiler}) async {
95
+ Future <void > runClangLike ({required ToolInstance compiler}) async {
96
96
final isStaticLib = staticLibrary != null ;
97
97
Uri ? archiver_;
98
98
if (isStaticLib) {
@@ -105,7 +105,7 @@ class RunCBuilder {
105
105
}
106
106
107
107
await runProcess (
108
- executable: compiler,
108
+ executable: compiler.uri ,
109
109
arguments: [
110
110
if (target.os == OS .android) ...[
111
111
// TODO(dacoharkes): How to solve linking issues?
@@ -160,8 +160,10 @@ class RunCBuilder {
160
160
] else ...[
161
161
'-fno-PIC' ,
162
162
'-fno-PIE' ,
163
- '-z' ,
164
- 'notext' ,
163
+ if (compiler.tool == clang) ...[
164
+ '-z' ,
165
+ 'notext' ,
166
+ ]
165
167
],
166
168
for (final MapEntry (key: name, : value) in defines.entries)
167
169
if (value == null ) '-D$name ' else '-D$name =$value ' ,
You can’t perform that action at this time.
0 commit comments