Skip to content

Commit 8d1b900

Browse files
authored
v.builder: fix compile asm file, followup of PR #26211 (#26227)
1 parent 0d3deba commit 8d1b900

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

‎vlib/v/builder/cc.v‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,16 +1224,14 @@ fn (mut v Builder) build_thirdparty_obj_file(mod string, path string, moduleflag
12241224
current_folder := os.getwd()
12251225
os.chdir(v.pref.vroot) or {}
12261226

1227-
mut all_options := []string{}
1228-
if source_kind != .asm {
1229-
all_options << v.pref.third_party_option
1230-
all_options << moduleflags.c_options_before_target()
1231-
}
1232-
all_options << '-o ${v.tcc_quoted_path(opath)}'
1233-
all_options << '-c ${v.tcc_quoted_path(source_file)}'
12341227
cc_options := if source_kind == .asm {
1235-
''
1228+
'-o ${v.tcc_quoted_path(opath)} -c ${v.tcc_quoted_path(source_file)}'
12361229
} else {
1230+
mut all_options := []string{cap: 4}
1231+
all_options << v.pref.third_party_option
1232+
all_options << moduleflags.c_options_before_target()
1233+
all_options << '-o ${v.tcc_quoted_path(opath)}'
1234+
all_options << '-c ${v.tcc_quoted_path(source_file)}'
12371235
cpp_file := source_kind == .cpp
12381236
v.thirdparty_object_args(v.ccoptions, all_options, cpp_file).join(' ')
12391237
}

0 commit comments

Comments
 (0)