MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getTarget

Method getTarget

lib/buildenvsetup/base.ts:207–229  ·  view source on GitHub ↗
(key: CacheKey)

Source from the content-addressed store, hash-verified

205 }
206
207 getTarget(key: CacheKey): string {
208 if (this.compilerTypeOrGCC === 'win32-vc') {
209 if (this.compilerSupportsX86) return 'x86';
210 if (this.compilerSupportsAMD64) return 'x86_64';
211 return '';
212 }
213
214 if (!this.compilerSupportsX86) return '';
215 if (this.compilerArch) return this.compilerArch;
216
217 if (key.options.includes('-m32')) {
218 return 'x86';
219 }
220 const target: string | undefined = _.find(key.options, option => {
221 return option.startsWith('-target=') || option.startsWith('--target=');
222 });
223
224 if (target) {
225 return target.substring(target.indexOf('=') + 1);
226 }
227
228 return 'x86_64';
229 }
230
231 hasBinariesToLink(details: VersionInfo) {
232 return (

Callers 1

Calls 1

findMethod · 0.80

Tested by

no test coverage detected