File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,14 @@ def get_dep_option(self, object):
114
114
dep_path = base + '.d'
115
115
return ["--depend" , dep_path ]
116
116
117
+ def get_config_option (self , config_header ) :
118
+ return ['--preinclude' , config_header ]
119
+
117
120
def get_compile_options (self , defines , includes ):
118
121
opts = ['-D%s' % d for d in defines ] + ['--via' , self .get_inc_file (includes )]
119
122
config_header = self .get_config_header ()
120
123
if config_header is not None :
121
- opts = opts + [ '--preinclude' , config_header ]
124
+ opts = opts + self . get_config_option ( config_header )
122
125
return opts
123
126
124
127
@hook_tool
Original file line number Diff line number Diff line change @@ -165,11 +165,14 @@ def get_dep_option(self, object):
165
165
dep_path = base + '.d'
166
166
return ["-MD" , "-MF" , dep_path ]
167
167
168
+ def get_config_option (self , config_header ):
169
+ return ['-include' , config_header ]
170
+
168
171
def get_compile_options (self , defines , includes ):
169
172
opts = ['-D%s' % d for d in defines ] + ['@%s' % self .get_inc_file (includes )]
170
173
config_header = self .get_config_header ()
171
174
if config_header is not None :
172
- opts = opts + [ '-include' , config_header ]
175
+ opts = opts + self . get_conifg_option ( config_header )
173
176
return opts
174
177
175
178
@hook_tool
Original file line number Diff line number Diff line change @@ -126,16 +126,20 @@ def cc_extra(self, object):
126
126
base , _ = splitext (object )
127
127
return ["-l" , base + '.s.txt' ]
128
128
129
+ def get_config_option (self , config_header ):
130
+ return ['--preinclude' , config_header ]
131
+
129
132
def get_compile_options (self , defines , includes , for_asm = False ):
130
- opts = ['-D%s' % d for d in defines ] + ['-f' , self .get_inc_file (includes )]
133
+ opts = ['-f' , self .get_inc_file (includes )]
134
+ config_header = self .get_config_header ()
131
135
if for_asm :
132
136
# The assembler doesn't support '--preinclude', so we need to add
133
137
# the macros directly
134
138
opts = opts + ['-D%s' % d for d in self .get_config_macros ()]
135
139
else :
136
140
config_header = self .get_config_header ()
137
141
if config_header is not None :
138
- opts = opts + [ '--preinclude' , config_header ]
142
+ opts = opts + self . get_config_option ( config_header )
139
143
return opts
140
144
141
145
@hook_tool
You can’t perform that action at this time.
0 commit comments