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

Function replaceSysrootArg

lib/toolchain-utils.ts:78–86  ·  view source on GitHub ↗
(compilerOptions: string[], newPath: string)

Source from the content-addressed store, hash-verified

76}
77
78export function replaceSysrootArg(compilerOptions: string[], newPath: string): string[] {
79 return compilerOptions.map(elem => {
80 if (elem.includes(clang_style_sysroot_flag)) {
81 return clang_style_sysroot_flag + path.normalize(newPath);
82 }
83
84 return elem;
85 });
86}
87
88export function getToolchainFlagFromOptions(options: string[]): string | false {
89 for (const elem of options) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected