fix compilation issue
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
//go:build !windows
|
//go:build !windows || !cgo
|
||||||
|
|
||||||
package capture
|
package capture
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build windows
|
//go:build windows && cgo
|
||||||
|
|
||||||
package capture
|
package capture
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !windows
|
//go:build !windows || !cgo
|
||||||
|
|
||||||
package capture
|
package capture
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build windows
|
//go:build windows && cgo
|
||||||
|
|
||||||
package capture
|
package capture
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,28 @@
|
|||||||
/>
|
/>
|
||||||
<span><i class="fa-brands fa-apple text-slate-200"></i> macOS ARM64</span>
|
<span><i class="fa-brands fa-apple text-slate-200"></i> macOS ARM64</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label
|
||||||
|
class="flex items-center gap-2 p-3 bg-slate-800/60 border border-slate-700 rounded-lg cursor-pointer hover:border-blue-500 transition-colors"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="platform"
|
||||||
|
value="freebsd-amd64"
|
||||||
|
class="w-4 h-4"
|
||||||
|
/>
|
||||||
|
<span><i class="fa-brands fa-linux text-cyan-300"></i> FreeBSD x64</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="flex items-center gap-2 p-3 bg-slate-800/60 border border-slate-700 rounded-lg cursor-pointer hover:border-blue-500 transition-colors"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="platform"
|
||||||
|
value="freebsd-arm64"
|
||||||
|
class="w-4 h-4"
|
||||||
|
/>
|
||||||
|
<span><i class="fa-brands fa-linux text-cyan-300"></i> FreeBSD ARM64</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -266,27 +266,25 @@ export async function startBuildProcess(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const buildTool = config.obfuscate ? "garble" : "go";
|
const buildTool = config.obfuscate ? "garble" : "go";
|
||||||
const verboseArg = "-x -v ";
|
|
||||||
const tagArg = config.noPrinting ? "-tags noprint " : "";
|
const tagArg = config.noPrinting ? "-tags noprint " : "";
|
||||||
logger.info(`[build:${buildId.substring(0, 8)}] Building: ${buildTool} build ${verboseArg}${tagArg}${ldflags ? `-ldflags="${ldflags}" ` : ""}-o ${outDir}/${outputName} ./cmd/agent`);
|
logger.info(`[build:${buildId.substring(0, 8)}] Building: ${buildTool} build ${tagArg}${ldflags ? `-ldflags="${ldflags}" ` : ""}-o ${outDir}/${outputName} ./cmd/agent`);
|
||||||
logger.info(`[build:${buildId.substring(0, 8)}] Environment: GOOS=${os} GOARCH=${actualArch} CGO_ENABLED=${env.CGO_ENABLED} CC=${env.CC || "<default>"}`);
|
logger.info(`[build:${buildId.substring(0, 8)}] Environment: GOOS=${os} GOARCH=${actualArch} CGO_ENABLED=${env.CGO_ENABLED} CC=${env.CC || "<default>"}`);
|
||||||
sendToStream({ type: "output", text: "Build trace enabled (-x -v)\n", level: "info" });
|
|
||||||
|
|
||||||
const buildCmd = config.obfuscate
|
const buildCmd = config.obfuscate
|
||||||
? (config.noPrinting
|
? (config.noPrinting
|
||||||
? (ldflags
|
? (ldflags
|
||||||
? $`garble build -x -v -tags noprint -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
? $`garble build -tags noprint -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
||||||
: $`garble build -x -v -tags noprint -o ${outDir}/${outputName} ./cmd/agent`)
|
: $`garble build -tags noprint -o ${outDir}/${outputName} ./cmd/agent`)
|
||||||
: (ldflags
|
: (ldflags
|
||||||
? $`garble build -x -v -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
? $`garble build -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
||||||
: $`garble build -x -v -o ${outDir}/${outputName} ./cmd/agent`))
|
: $`garble build -o ${outDir}/${outputName} ./cmd/agent`))
|
||||||
: (config.noPrinting
|
: (config.noPrinting
|
||||||
? (ldflags
|
? (ldflags
|
||||||
? $`go build -x -v -tags noprint -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
? $`go build -tags noprint -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
||||||
: $`go build -x -v -tags noprint -o ${outDir}/${outputName} ./cmd/agent`)
|
: $`go build -tags noprint -o ${outDir}/${outputName} ./cmd/agent`)
|
||||||
: (ldflags
|
: (ldflags
|
||||||
? $`go build -x -v -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
? $`go build -ldflags=${ldflags} -o ${outDir}/${outputName} ./cmd/agent`
|
||||||
: $`go build -x -v -o ${outDir}/${outputName} ./cmd/agent`));
|
: $`go build -o ${outDir}/${outputName} ./cmd/agent`));
|
||||||
|
|
||||||
const proc = buildCmd.env(env).cwd(clientDir).nothrow();
|
const proc = buildCmd.env(env).cwd(clientDir).nothrow();
|
||||||
let result: any;
|
let result: any;
|
||||||
|
|||||||
@@ -23,4 +23,6 @@ export const ALLOWED_PLATFORMS = new Set([
|
|||||||
"linux-armv7",
|
"linux-armv7",
|
||||||
"darwin-amd64",
|
"darwin-amd64",
|
||||||
"darwin-arm64",
|
"darwin-arm64",
|
||||||
|
"freebsd-amd64",
|
||||||
|
"freebsd-arm64",
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user