(fullResult: BuildResult, inputArch: Arch, objectFilename: string, outputFilename: string)
| 113 | } |
| 114 | |
| 115 | async runLinker(fullResult: BuildResult, inputArch: Arch, objectFilename: string, outputFilename: string) { |
| 116 | const execOptions = this.getDefaultExecOptions(); |
| 117 | execOptions.customCwd = path.dirname(objectFilename); |
| 118 | |
| 119 | const options = ['-o', outputFilename]; |
| 120 | if (inputArch === 'x86') { |
| 121 | options.push('-m', 'elf_i386'); |
| 122 | } else if (inputArch === 'x86_64') { |
| 123 | // default target |
| 124 | } else { |
| 125 | const result: BuildStep = { |
| 126 | code: -1, |
| 127 | step: 'ld', |
| 128 | stderr: [{text: 'Invalid architecture for linking and execution'}], |
| 129 | okToCache: false, |
| 130 | filenameTransform: (fn: string) => fn, |
| 131 | stdout: [], |
| 132 | execTime: 0, |
| 133 | timedOut: false, |
| 134 | compilationOptions: [], |
| 135 | }; |
| 136 | fullResult.buildsteps!.push(result); |
| 137 | return result; |
| 138 | } |
| 139 | options.push(objectFilename); |
| 140 | |
| 141 | return this.doBuildstepAndAddToResult(fullResult, 'ld', this.env.ceProps('ld') as string, options, execOptions); |
| 142 | } |
| 143 | |
| 144 | override getExecutableFilename(dirPath: string) { |
| 145 | return path.join(dirPath, 'ce-asm-executable'); |
no test coverage detected