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

Method getOutputFilename

lib/compilers/ada.ts:65–82  ·  view source on GitHub ↗
(dirPath: string, outputFilebase: string, key?: any)

Source from the content-addressed store, hash-verified

63 }
64
65 override getOutputFilename(dirPath: string, outputFilebase: string, key?: any): string {
66 // The basename here must match the value used in the pragma Source_File
67 // in the user provided source.
68
69 // Beware that GNAT is picky on output filename:
70 // - the basename must match the unit name (emits error otherwise)
71 // - can't do "-c -o foo.out", output must end with .o
72 // - "foo.o" may be used by intermediary file, so "-o foo.o" will not
73 // work if building an executable.
74
75 if (key?.filters?.binary) {
76 return path.join(dirPath, 'example');
77 }
78 if (key?.filters?.binaryObject) {
79 return path.join(dirPath, 'example.o');
80 }
81 return path.join(dirPath, 'example.s');
82 }
83
84 override prepareArguments(
85 userOptions: string[],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected