File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1034,6 +1034,8 @@ def get_clang_command_asm():
10341034
10351035 # In COMPILE_AND_LINK we need to compile source files too, but we also need to
10361036 # filter out the link flags
1037+ assert state .mode == Mode .COMPILE_AND_LINK
1038+ assert not state .has_dash_c
10371039 compile_args = filter_out_link_flags (compile_args )
10381040 linker_inputs = []
10391041 seen_names = {}
@@ -1058,10 +1060,7 @@ def compile_source_file(i, input_file):
10581060 cmd = get_clang_command ()
10591061 if get_file_suffix (input_file ) in ['.pcm' ]:
10601062 cmd = [c for c in cmd if not c .startswith ('-fprebuilt-module-path=' )]
1061- cmd += [input_file ]
1062- if not state .has_dash_c :
1063- cmd += ['-c' ]
1064- cmd += ['-o' , output_file ]
1063+ cmd += ['-c' , input_file , '-o' , output_file ]
10651064 if state .mode == Mode .COMPILE_AND_LINK and '-gsplit-dwarf' in newargs :
10661065 # When running in COMPILE_AND_LINK mode we compile to temporary location
10671066 # but we want the `.dwo` file to be generated in the current working directory,
You can’t perform that action at this time.
0 commit comments