From 61790dd09bc3b79a87f7e579135c2caa6ac56559 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 27 Jul 2023 07:15:34 -0700 Subject: [PATCH] Fail is wasm GNU not set. Use -gseparate-dwarf instead of -g --- IDE/src/BuildContext.bf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/IDE/src/BuildContext.bf b/IDE/src/BuildContext.bf index d9549fbb..fc1ace98 100644 --- a/IDE/src/BuildContext.bf +++ b/IDE/src/BuildContext.bf @@ -643,6 +643,12 @@ namespace IDE bool isExe = ((project.mGeneralOptions.mTargetType != Project.TargetType.BeefLib) && (project.mGeneralOptions.mTargetType != Project.TargetType.BeefTest)) || (isTest); bool isDynLib = (project.mGeneralOptions.mTargetType == Project.TargetType.BeefLib) && (options.mBuildOptions.mBuildKind == .DynamicLib); + if (workspaceOptions.mToolsetType != .GNU) + { + gApp.OutputErrorLine("Workspace Build Toolset options must be set to GNU for WASM builds"); + return false; + } + if (isExe || isDynLib) { var actualTargetPath = Path.GetActualPathName(targetPath, .. scope .()); @@ -710,7 +716,7 @@ namespace IDE linkLine.Append(" -pthread"); if (workspaceOptions.mEmitDebugInfo != .No) - linkLine.Append(" -g"); + linkLine.Append(" -gseparate-dwarf"); if (!workspaceOptions.mRuntimeChecks) linkLine.Append(" -s ASSERTIONS=0");