From c9e0ab6089c0772589d612615c74b0faec08d224 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 11 Oct 2019 05:58:08 -0700 Subject: [PATCH] Added changes to support CompilerExplorer --- BeefBoot/BeefBoot.cpp | 44 ++++-- BeefBoot/BootApp.cpp | 158 ++++++++++++++++--- BeefBoot/BootApp.h | 14 +- BeefBuild/BeefProj.toml | 8 +- BeefLibs/corlib/src/Reflection/MethodInfo.bf | 26 +-- BeefLibs/corlib/src/Type.bf | 2 +- BeefySysLib/platform/linux/LinuxCommon.cpp | 59 ++++++- IDE/src/Compiler/BfProject.bf | 27 +++- IDE/src/ui/WatchPanel.bf | 49 ------ IDEHelper/Compiler/BfCodeGen.cpp | 5 +- IDEHelper/Compiler/BfCompiler.cpp | 2 +- IDEHelper/Compiler/BfContext.cpp | 49 ++++-- IDEHelper/Compiler/BfContext.h | 1 + IDEHelper/Compiler/BfIRCodeGen.cpp | 11 +- IDEHelper/Compiler/BfIRCodeGen.h | 1 + IDEHelper/Compiler/BfModule.cpp | 14 +- IDEHelper/Compiler/BfModuleTypeUtils.cpp | 9 +- IDEHelper/Compiler/BfSystem.cpp | 30 +++- IDEHelper/Compiler/BfSystem.h | 30 +++- bin/build.sh | 6 +- 20 files changed, 389 insertions(+), 156 deletions(-) diff --git a/BeefBoot/BeefBoot.cpp b/BeefBoot/BeefBoot.cpp index e9ac58c7..db502e6f 100644 --- a/BeefBoot/BeefBoot.cpp +++ b/BeefBoot/BeefBoot.cpp @@ -47,36 +47,58 @@ int main(int argc, char* argv[]) gApp = new BootApp(); + /*for (int i = 0; i < argc; i++) + { + if (i != 0) + std::cout << " "; + std::cout << argv[i]; + } + std::cout << std::endl;*/ + + String cmd; + bool success = true; for (int i = 1; i < argc; i++) - { - std::string arg = argv[i]; - + { + String arg = argv[i]; + if (arg.StartsWith("--")) + arg.Remove(0, 1); + + if (!cmd.IsEmpty()) + { + cmd.Append('='); + arg.Insert(0, cmd); + cmd.Clear(); + } + if (arg[0] == '"') { - arg.erase(0, 1); + arg.Remove(0, 1); if ((arg.length() > 1) && (arg[arg.length() - 1] == '"')) - arg.erase(arg.length() - 1); + arg.RemoveToEnd(arg.length() - 1); success &= gApp->HandleCmdLine(arg, ""); continue; } - int eqPos = (int)arg.find('='); + int eqPos = (int)arg.IndexOf('='); if (eqPos == -1) { success &= gApp->HandleCmdLine(arg, ""); continue; } - std::string cmd = arg.substr(0, eqPos); - std::string param = arg.substr(eqPos + 1); + cmd = arg.Substring(0, eqPos); + if (eqPos == arg.length() - 1) + continue; + String param = arg.Substring(eqPos + 1); if ((param.length() > 1) && (param[0] == '"')) { - param.erase(0, 1); + param.Remove(0, 1); if ((param.length() > 1) && (param[param.length() - 1] == '"')) - param.erase(param.length() - 1); + param.Remove(param.length() - 1); } - success &= gApp->HandleCmdLine(cmd, param); + success &= gApp->HandleCmdLine(cmd, param); + cmd.Clear(); } if (!gApp->mShowedHelp) diff --git a/BeefBoot/BootApp.cpp b/BeefBoot/BootApp.cpp index f4bdd990..23e12700 100644 --- a/BeefBoot/BootApp.cpp +++ b/BeefBoot/BootApp.cpp @@ -76,7 +76,7 @@ BF_IMPORT void BF_CALLTYPE BfSystem_AddTypeOptions(void* bfSystem, const char* f BF_IMPORT void BF_CALLTYPE BfProject_SetDisabled(void* bfProject, bool disabled); BF_IMPORT void BF_CALLTYPE BfProject_SetOptions(void* bfProject, int targetType, const char* startupObject, const char* preprocessorMacros, - int optLevel, int ltoType, bool mergeFunctions, bool combineLoads, bool vectorizeLoops, bool vectorizeSLP); + int optLevel, int ltoType, int32 flags); BF_IMPORT void BF_CALLTYPE BfProject_ClearDependencies(void* bfProject); BF_IMPORT void BF_CALLTYPE BfProject_AddDependency(void* bfProject, void* depProject); @@ -169,6 +169,10 @@ BootApp::BootApp() mSystem = NULL; mCompiler = NULL; mProject = NULL; + mCELibProject = NULL; + mIsCERun = false; + mAsmKind = BfAsmKind_None; + mStartupObject = "Program"; #ifdef BF_PLATFORM_WINDOWS mOptLevel = BfOptLevel_OgPlus; @@ -177,7 +181,7 @@ BootApp::BootApp() mOptLevel = BfOptLevel_O0; mToolset = BfToolsetType_GNU; #endif - mEmitIR = false; + mEmitIR = false; GetConsoleColor(gConsoleFGColor, gConsoleBGColor); } @@ -246,19 +250,25 @@ bool BootApp::HandleCmdLine(const String &cmd, const String& param) bool wantedParam = false; - if ((cmd == "--help") || (cmd == "-h") || (cmd == "/?")) + if ((!cmd.StartsWith("-")) && (mIsCERun) && (mCESrc.IsEmpty())) + { + mCESrc = cmd; + return true; + } + + if ((cmd == "-help") || (cmd == "-h") || (cmd == "/?")) { mShowedHelp = true; std::cout << "BeefBoot - Beef bootstrapping tool" << std::endl; return false; } - else if (cmd == "--src") + else if (cmd == "-src") { mRequestedSrc.Add(param); wantedParam = true; } - else if (cmd == "--verbosity") + else if (cmd == "-verbosity") { if (param == "quiet") mVerbosity = Verbosity_Quiet; @@ -277,24 +287,34 @@ bool BootApp::HandleCmdLine(const String &cmd, const String& param) } wantedParam = true; } - else if (cmd == "--define") + else if (cmd == "-version") + { + BfpSystemResult sysResult; + String exePath; + BFP_GETSTR_HELPER(exePath, sysResult, BfpSystem_GetExecutablePath(__STR, __STRLEN, &sysResult)); + + std::cout << "0.0.0" << std::endl; + mShowedHelp = true; + return true; + } + else if (cmd == "-define") { if (!mDefines.IsEmpty()) mDefines += "\n"; mDefines += param; wantedParam = true; } - else if (cmd == "--startup") + else if (cmd == "-startup") { mStartupObject = param; wantedParam = true; } - else if (cmd == "--out") + else if (cmd == "-out") { mTargetPath = param; wantedParam = true; } - else if (cmd == "--linkparams") + else if (cmd == "-linkparams") { mLinkParams = param; wantedParam = true; @@ -326,6 +346,31 @@ bool BootApp::HandleCmdLine(const String &cmd, const String& param) else if (cmd == "-emitir") { mEmitIR = true; + } + else if (cmd == "-cedest") + { + mIsCERun = true; + mCEDest = param; + wantedParam = true; + } + else if (cmd == "-cesrc") + { + mIsCERun = true; + } + else if (cmd == "-emitasm") + { + if (param.IsEmpty()) + { + mAsmKind = BfAsmKind_Intel; + } + else + { + if (param == "att") + mAsmKind = BfAsmKind_ATT; + else + mAsmKind = BfAsmKind_Intel; + wantedParam = true; + } } else { @@ -353,7 +398,7 @@ bool BootApp::Init() mWorkingDir = cwdPtr; free(cwdPtr); - if (mTargetPath.IsEmpty()) + if ((mTargetPath.IsEmpty()) && (mCESrc.IsEmpty())) { Fail("'Out' path not specified"); } @@ -366,7 +411,7 @@ bool BootApp::Init() return !mHadErrors; } -void BootApp::QueueFile(const StringImpl& path) +void BootApp::QueueFile(const StringImpl& path, void* project) { String ext; ext = GetFileExtension(path); @@ -382,7 +427,7 @@ void BootApp::QueueFile(const StringImpl& path) } bool worked = true; - void* bfParser = BfSystem_CreateParser(mSystem, mProject); + void* bfParser = BfSystem_CreateParser(mSystem, project); BfParser_SetSource(bfParser, data, len, path.c_str()); //bfParser.SetCharIdData(charIdData); worked &= BfParser_Parse(bfParser, mPassInstance, false); @@ -404,7 +449,7 @@ void BootApp::QueuePath(const StringImpl& path) String fileName; fileName = GetFileName(filePath); - QueueFile(filePath); + QueueFile(filePath, (mCELibProject != NULL) ? mCELibProject : mProject); } for (auto& fileEntry : FileEnumerator(path, FileEnumerator::Flags_Directories)) @@ -416,12 +461,12 @@ void BootApp::QueuePath(const StringImpl& path) if (dirName == "build") continue; - QueuePath(childPath); + QueuePath(childPath); } } else { - QueueFile(path); + QueueFile(path, mProject); } } @@ -677,8 +722,7 @@ void BootApp::DoLinkMS() BfpSpawnFlags flags = BfpSpawnFlag_None; if (true) - { - //if (linkLine.HasMultibyteChars()) + { if (true) flags = (BfpSpawnFlags)(BfpSpawnFlag_UseArgsFile | BfpSpawnFlag_UseArgsFile_Native | BfpSpawnFlag_UseArgsFile_BOM); else @@ -739,9 +783,19 @@ bool BootApp::Compile() int dotPos = (int)projectName.IndexOf('.'); if (dotPos != -1) projectName.RemoveToEnd(dotPos); + if (projectName.IsEmpty()) + projectName.Append("BeefProject"); mProject = BfSystem_CreateProject(mSystem, projectName.c_str()); + if (mIsCERun) + { + mCELibProject = BfSystem_CreateProject(mSystem, "BeefLib"); + + BfProjectFlags flags = BfProjectFlags_None; + BfProject_SetOptions(mCELibProject, BfTargetType_BeefLib, "", mDefines.c_str(), mOptLevel, 0, flags); + } + if (!mDefines.IsEmpty()) mDefines.Append("\n"); mDefines.Append("BF_64_BIT"); @@ -750,10 +804,22 @@ bool BootApp::Compile() mDefines.Append(BF_PLATFORM_NAME); int ltoType = 0; - BfProject_SetOptions(mProject, mTargetType, mStartupObject.c_str(), mDefines.c_str(), mOptLevel, ltoType, false, false, false, false); + BfProjectFlags flags = BfProjectFlags_None; + if (mIsCERun) + { + flags = (BfProjectFlags)(flags | BfProjectFlags_SingleModule | BfProjectFlags_AlwaysIncludeAll); + if (mAsmKind == BfAsmKind_ATT) + flags = (BfProjectFlags)(flags | BfProjectFlags_AsmOutput | BfProjectFlags_AsmOutput_ATT); + else if (mAsmKind == BfAsmKind_Intel) + flags = (BfProjectFlags)(flags | BfProjectFlags_AsmOutput); + } + BfProject_SetOptions(mProject, mTargetType, mStartupObject.c_str(), mDefines.c_str(), mOptLevel, ltoType, flags); + + if (mCELibProject != NULL) + BfProject_AddDependency(mProject, mCELibProject); mPassInstance = BfSystem_CreatePassInstance(mSystem); - + Beefy::String exePath; BfpGetStrHelper(exePath, [](char* outStr, int* inOutStrSize, BfpResult* result) { @@ -762,18 +828,23 @@ bool BootApp::Compile() mBuildDir = GetFileDir(exePath) + "/build"; RecursiveCreateDirectory(mBuildDir + "/" + projectName); + if (mIsCERun) + RecursiveCreateDirectory(mBuildDir + "/BeefLib"); BfCompilerOptionFlags optionFlags = (BfCompilerOptionFlags)(BfCompilerOptionFlag_EmitDebugInfo | BfCompilerOptionFlag_EmitLineInfo | BfCompilerOptionFlag_GenerateOBJ); if (mEmitIR) optionFlags = (BfCompilerOptionFlags)(optionFlags | BfCompilerOptionFlag_WriteIR); - int maxWorkerThreads = BfpSystem_GetNumLogicalCPUs(NULL); if (maxWorkerThreads <= 1) maxWorkerThreads = 6; BfCompiler_SetOptions(mCompiler, NULL, 0, BfMachineType_x64, mToolset, BfSIMDSetting_SSE2, 1, maxWorkerThreads, optionFlags, "malloc", "free"); + if (mIsCERun) + { + QueueFile(mCESrc, mProject); + } for (auto& srcName : mRequestedSrc) { String absPath = GetAbsPath(srcName, mWorkingDir); @@ -784,6 +855,51 @@ bool BootApp::Compile() { DoCompile(); OutputLine(StrFormat("TIMING: Beef compiling: %0.1fs", (BFTickCount() - startTick) / 1000.0), OutputPri_Normal); + + if (!mCEDest.IsEmpty()) + { + String ext; + String srcResult = mBuildDir + "/BeefProject/BeefProject"; + if (mAsmKind == BfAsmKind_None) + srcResult += BF_OBJ_EXT; + else + srcResult += ".s"; + + BfpFileResult result = BfpFileResult_Ok; + BfpFile_Copy(srcResult.c_str(), mCEDest.c_str(), BfpFileCopyKind_Always, &result); + if (result != BfpFileResult_Ok) + { + Fail(StrFormat("Failed to copy '%s' to '%s'", srcResult.c_str(), mCEDest.c_str())); + } + } + + if ((mIsCERun) && (mEmitIR)) + { + String ext; + String srcResult = mBuildDir + "/BeefProject/BeefProject"; + String irDestPath = mCEDest; + int dotPos = (int)irDestPath.LastIndexOf('.'); + if (dotPos != -1) + irDestPath.RemoveToEnd(dotPos); + + if (mOptLevel == BfOptLevel_OgPlus) + { + srcResult += ".beir"; + irDestPath += ".ll"; + } + else + { + srcResult += ".ll"; + irDestPath += ".ll"; + } + + BfpFileResult result = BfpFileResult_Ok; + BfpFile_Copy(srcResult.c_str(), irDestPath.c_str(), BfpFileCopyKind_Always, &result); + if (result != BfpFileResult_Ok) + { + Fail(StrFormat("Failed to copy '%s' to '%s'", srcResult.c_str(), mCEDest.c_str())); + } + } } while (true) @@ -820,7 +936,7 @@ bool BootApp::Compile() OutputLine(msg); } - if (!mHadErrors) + if ((!mHadErrors) && (!mTargetPath.IsEmpty())) { if (mVerbosity == Verbosity_Normal) { diff --git a/BeefBoot/BootApp.h b/BeefBoot/BootApp.h index 81ee909e..ae2991fb 100644 --- a/BeefBoot/BootApp.h +++ b/BeefBoot/BootApp.h @@ -40,7 +40,7 @@ public: bool mHadErrors; Array mRequestedSrc; BfOptLevel mOptLevel; - BfToolsetType mToolset; + BfToolsetType mToolset; bool mEmitIR; String mBuildDir; String mWorkingDir; @@ -48,18 +48,24 @@ public: String mStartupObject; String mTargetPath; String mLinkParams; + BfAsmKind mAsmKind; void* mSystem; - void* mCompiler; - void* mProject; + void* mCompiler; + void* mProject; void* mPassInstance; + bool mIsCERun; + void* mCELibProject; + String mCESrc; + String mCEDest; + public: void Fail(const String & error); void OutputLine(const String& text, OutputPri outputPri = OutputPri_Normal); bool QueueRun(const String& fileName, const String& args, const String& workingDir, BfpSpawnFlags extraFlags); - void QueueFile(const StringImpl& path); + void QueueFile(const StringImpl& path, void* project); void QueuePath(const StringImpl& path); void DoCompile(); void DoLinkMS(); diff --git a/BeefBuild/BeefProj.toml b/BeefBuild/BeefProj.toml index 8d9180b9..c27bfec6 100644 --- a/BeefBuild/BeefProj.toml +++ b/BeefBuild/BeefProj.toml @@ -5,6 +5,10 @@ Dependencies = {Beefy2D = "*", corlib = "*"} Name = "BeefBuild" StartupObject = "BeefBuild.Program" +[Platform.Windows] +Description = "BeefBuild" +FileVersion = "0.42.1" + [Configs.Debug.Win32] TargetName = "" OtherLinkFlags = "" @@ -16,8 +20,8 @@ TargetName = "$(ProjectName)_d" OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib Rpcrt4.lib Ole32.lib" CLibType = "Dynamic" BeefLibType = "DynamicDebug" -DebugCommandArguments = "-run" -DebugWorkingDirectory = "c:\\temp\\Hello2" +DebugCommandArguments = "--version" +DebugWorkingDirectory = "c:\\beef\\ide\\mintest" EnvironmentVars = ["_NO_DEBUG_HEAP=1"] PreprocessorMacros = ["DEBUG", "CLI"] diff --git a/BeefLibs/corlib/src/Reflection/MethodInfo.bf b/BeefLibs/corlib/src/Reflection/MethodInfo.bf index 6de0d25b..83e69cac 100644 --- a/BeefLibs/corlib/src/Reflection/MethodInfo.bf +++ b/BeefLibs/corlib/src/Reflection/MethodInfo.bf @@ -160,31 +160,7 @@ namespace System.Reflection dataPtr = *(void**)dataPtr; handled = true; } - else - { - if (!underlyingType.IsSubtypeOf(paramType)) - { - if (underlyingType.IsGenericType) - { - var ptrTypedPrimitive = (SpecializedGenericType)underlyingType; - if ((ptrTypedPrimitive.mTypeFlags.HasFlag(.Sys_PointerT))) - { - let elementType = Type.GetType(ptrTypedPrimitive.mResolvedTypeRefs[0]); - if (elementType == paramType) - { - dataPtr = *(void**)dataPtr; - handled = true; - } - } - } - - /*if (underlyingType.IsSpecialType(TypeInstance.[Friend]sPointerTType, "System", "Pointer", 2)) - { - - }*/ - } - } - + if (!handled) { if (!underlyingType.IsSubtypeOf(paramType)) diff --git a/BeefLibs/corlib/src/Type.bf b/BeefLibs/corlib/src/Type.bf index 388df281..8977553c 100644 --- a/BeefLibs/corlib/src/Type.bf +++ b/BeefLibs/corlib/src/Type.bf @@ -826,7 +826,7 @@ namespace System.Reflection SizedArray = 0x0800, Splattable = 0x1000, Union = 0x2000, - Sys_PointerT = 0x4000, // System.Pointer + // WantsMark = 0x8000, Delegate = 0x10000, HasDestructor = 0x20000, diff --git a/BeefySysLib/platform/linux/LinuxCommon.cpp b/BeefySysLib/platform/linux/LinuxCommon.cpp index 6689cc27..6bc4132e 100644 --- a/BeefySysLib/platform/linux/LinuxCommon.cpp +++ b/BeefySysLib/platform/linux/LinuxCommon.cpp @@ -1816,7 +1816,64 @@ BFP_EXPORT void BFP_CALLTYPE BfpFile_SetAttributes(const char* path, BfpFileAttr BFP_EXPORT void BFP_CALLTYPE BfpFile_Copy(const char* oldPath, const char* newPath, BfpFileCopyKind copyKind, BfpFileResult* outResult) { - NOT_IMPL; + int fd_to, fd_from; + char buf[4096]; + ssize_t nread; + + fd_from = open(oldPath, O_RDONLY); + if (fd_from < 0) + { + OUTRESULT(BfpFileResult_NotFound); + return; + } + + fd_to = open(newPath, O_WRONLY | O_CREAT | O_EXCL, 0666); + if (fd_to < 0) + { + OUTRESULT(BfpFileResult_AlreadyExists); + goto out_error; + } + + while (nread = read(fd_from, buf, sizeof buf), nread > 0) + { + char *out_ptr = buf; + ssize_t nwritten; + + do { + nwritten = write(fd_to, out_ptr, nread); + + if (nwritten >= 0) + { + nread -= nwritten; + out_ptr += nwritten; + } + else if (errno != EINTR) + { + OUTRESULT(BfpFileResult_UnknownError); + goto out_error; + } + } while (nread > 0); + } + + if (nread == 0) + { + if (close(fd_to) < 0) + { + fd_to = -1; + OUTRESULT(BfpFileResult_UnknownError); + goto out_error; + } + close(fd_from); + + /* Success! */ + OUTRESULT(BfpFileResult_Ok); + return; + } + +out_error: + close(fd_from); + if (fd_to >= 0) + close(fd_to); } BFP_EXPORT void BFP_CALLTYPE BfpFile_Rename(const char* oldPath, const char* newPath, BfpFileResult* outResult) diff --git a/IDE/src/Compiler/BfProject.bf b/IDE/src/Compiler/BfProject.bf index 815ee9d1..348fc48f 100644 --- a/IDE/src/Compiler/BfProject.bf +++ b/IDE/src/Compiler/BfProject.bf @@ -8,6 +8,18 @@ namespace IDE.Compiler { public class BfProject { + enum Flags : int32 + { + None = 0, + MergeFunctions = 1, + CombineLoads = 2, + VectorizeLoops = 4, + VectorizeSLP = 8, + SingleModule = 0x10, + AsmOutput = 0x20, + AsmOutput_ATT = 0x40, + } + [StdCall, CLink] extern static void BfProject_Delete(void* nativeBfProject); @@ -22,7 +34,7 @@ namespace IDE.Compiler [StdCall, CLink] extern static void BfProject_SetOptions(void* nativeBfProject, int32 targetType, char8* startupObject, char8* preprocessorMacros, - int32 optLevel, int32 ltoType, bool mergeFunctions, bool combineLoads, bool vectorizeLoops, bool vectorizeSLP); + int32 optLevel, int32 ltoType, Flags flags); public void* mNativeBfProject; public bool mDisabled; @@ -51,10 +63,21 @@ namespace IDE.Compiler public void SetOptions(Project.TargetType targetType, String startupObject, List preprocessorMacros, BuildOptions.BfOptimizationLevel optLevel, BuildOptions.LTOType ltoType, bool mergeFunctions, bool combineLoads, bool vectorizeLoops, bool vectorizeSLP) { + Flags flags = default; + void SetFlags(bool val, Flags flag) + { + if (val) + flags |= flag; + } + SetFlags(mergeFunctions, .MergeFunctions); + SetFlags(combineLoads, .CombineLoads); + SetFlags(vectorizeLoops, .VectorizeLoops); + SetFlags(vectorizeSLP, .VectorizeSLP); + String macrosStr = scope String(); macrosStr.Join("\n", preprocessorMacros.GetEnumerator()); BfProject_SetOptions(mNativeBfProject, (int32)targetType, startupObject, macrosStr, - (int32)optLevel, (int32)ltoType, mergeFunctions, combineLoads, vectorizeLoops, vectorizeSLP); + (int32)optLevel, (int32)ltoType, flags); } } diff --git a/IDE/src/ui/WatchPanel.bf b/IDE/src/ui/WatchPanel.bf index ebf941e7..cb371ba1 100644 --- a/IDE/src/ui/WatchPanel.bf +++ b/IDE/src/ui/WatchPanel.bf @@ -1179,48 +1179,6 @@ namespace IDE.ui } } - public void RemoveInvalidContinuationItems() - { - /*var lastValidListViewItem = this; - for (int32 idx = 1; idx < mWatchSeriesInfo.mCount; idx++) - { - int32 parentIdx = idx + mWatchSeriesInfo.mStartMemberIdx; - if (parentIdx >= mParentItem.mChildItems.Count) - break; - - WatchListViewItem watchListViewItem = (WatchListViewItem)mParentItem.mChildItems[parentIdx]; - if (watchListViewItem.mWatchSeriesInfo != mWatchSeriesInfo) - break; - if (watchListViewItem.mSeriesMemberIdx == 0) - break; - - int addrSize = IDEApp.sApp.mDebugger.GetAddrSize() * 2; - int addrsCount = (mWatchSeriesInfo.mAddrs.Length / addrSize) / mWatchSeriesInfo.mAddrsEntrySize; - if (watchListViewItem.mSeriesMemberIdx >= addrsCount) - { - lastValidListViewItem.mBottomPadding += watchListViewItem.mSelfHeight + watchListViewItem.mBottomPadding; - mListView.mListSizeDirty = true; - mParentItem.RemoveChildItem(watchListViewItem); - idx--; - } - else - lastValidListViewItem = watchListViewItem; - }*/ - - // This caused 'closing' opened items with Dictionary elements when stepping - /*if (mWatchSeriesInfo.mAddrs != null) - { - int32 checkIdx = mWatchSeriesInfo.mStartMemberIdx + 1; - while (checkIdx < mParentItem.mChildItems.Count) - { - WatchListViewItem watchListViewItem = (WatchListViewItem)mParentItem.mChildItems[checkIdx]; - if (watchListViewItem.mWatchSeriesInfo != mWatchSeriesInfo) - break; - //mParentItem.RemoveChildItem(watchListViewItem); - } - }*/ - } - public override void Update() { if ((mWatchEntry != null) && (mWatchEntry.mIsPending)) @@ -2508,13 +2466,6 @@ namespace IDE.ui while (listViewItem.GetChildCount() > memberCount) listViewItem.RemoveChildItem(listViewItem.GetChildAtIndex(memberCount)); - if ((watchSeriesInfo != null) && (watchSeriesInfo.mAddrs != null)) - { - var headItem = (WatchListViewItem)listViewItem.GetChildAtIndex(watchSeriesInfo.mStartMemberIdx); - headItem.RemoveInvalidContinuationItems(); - mListView.UpdateAll(); - } - if ((listViewItem.GetChildCount() == 0) && (listViewItem.mOpenButton != null)) { Widget.RemoveAndDelete(listViewItem.mOpenButton); diff --git a/IDEHelper/Compiler/BfCodeGen.cpp b/IDEHelper/Compiler/BfCodeGen.cpp index 42d48394..e303ae6f 100644 --- a/IDEHelper/Compiler/BfCodeGen.cpp +++ b/IDEHelper/Compiler/BfCodeGen.cpp @@ -497,7 +497,10 @@ void BfCodeGenThread::RunLoop() BP_ZONE("BfCodeGen::RunLoop.LLVM.OBJ"); String outFileName; - outFileName = request->mOutFileName + BF_OBJ_EXT; + if (request->mOptions.mAsmKind != BfAsmKind_None) + outFileName = request->mOutFileName + ".s"; + else + outFileName = request->mOutFileName + BF_OBJ_EXT; if (!llvmIRCodeGen->WriteObjectFile(outFileName, request->mOptions)) { result.mType = BfCodeGenResult_Failed; diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index 206855f0..ca627cf7 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -5529,7 +5529,7 @@ void BfCompiler::CompileReified() if (typeDef->mIsPartial) continue; - bool isAlwaysInclude = typeDef->mIsAlwaysInclude; + bool isAlwaysInclude = (typeDef->mIsAlwaysInclude) || (typeDef->mProject->mAlwaysIncludeAll); if (typeDef->mProject->IsTestProject()) { diff --git a/IDEHelper/Compiler/BfContext.cpp b/IDEHelper/Compiler/BfContext.cpp index b7930839..5665540c 100644 --- a/IDEHelper/Compiler/BfContext.cpp +++ b/IDEHelper/Compiler/BfContext.cpp @@ -149,7 +149,8 @@ void BfContext::AssignModule(BfType* type) BF_ASSERT(!typeInst->mModule->mIsReified); } - BfModule* module; + BfModule* module = NULL; + bool needsModuleInit = false; // We used to have this "IsReified" check, but we DO want to create modules for unreified types even if they remain unused. // What was that IsReified check catching? @@ -166,20 +167,46 @@ void BfContext::AssignModule(BfType* type) BF_ASSERT(typeProcessEntry->mType->mContext == this); BfLogSysM("HandleTypeWorkItem: %p -> %p\n", type, typeProcessEntry->mType); mCompiler->mStats.mTypesQueued++; - mCompiler->UpdateCompletion(); + mCompiler->UpdateCompletion(); } else { auto typeInst = type->ToTypeInstance(); BF_ASSERT(typeInst != NULL); - - String moduleName = GenerateModuleName(typeInst); - module = new BfModule(this, moduleName); - module->mIsReified = typeInst->mIsReified; - module->mProject = typeInst->mTypeDef->mProject; - typeInst->mModule = module; - BF_ASSERT(!mLockModules); - mModules.push_back(module); + + auto project = typeInst->mTypeDef->mProject; + if ((project->mSingleModule) && (typeInst->mIsReified)) + { + BfModule** modulePtr = NULL; + if (mProjectModule.TryAdd(project, NULL, &modulePtr)) + { + String moduleName = project->mName; + module = new BfModule(this, moduleName); + module->mIsReified = true; + module->mProject = project; + typeInst->mModule = module; + BF_ASSERT(!mLockModules); + mModules.push_back(module); + *modulePtr = module; + needsModuleInit = true; + } + else + { + module = *modulePtr; + typeInst->mModule = module; + } + } + else + { + String moduleName = GenerateModuleName(typeInst); + module = new BfModule(this, moduleName); + module->mIsReified = typeInst->mIsReified; + module->mProject = project; + typeInst->mModule = module; + BF_ASSERT(!mLockModules); + mModules.push_back(module); + needsModuleInit = true; + } } auto localTypeInst = type->ToTypeInstance(); @@ -191,7 +218,7 @@ void BfContext::AssignModule(BfType* type) module->mOwnedTypeInstances.push_back(localTypeInst); } - if (!module->mIsScratchModule) + if (needsModuleInit) module->Init(); } diff --git a/IDEHelper/Compiler/BfContext.h b/IDEHelper/Compiler/BfContext.h index b3c1866f..7daab6bb 100644 --- a/IDEHelper/Compiler/BfContext.h +++ b/IDEHelper/Compiler/BfContext.h @@ -289,6 +289,7 @@ public: BfModule* mScratchModule; BfModule* mUnreifiedModule; HashSet mUsedModuleNames; + Dictionary mProjectModule; Array mModules; Array mDeletingModules; HashSet mFailTypes; // All types handled after a failure need to be rebuild on subsequent compile diff --git a/IDEHelper/Compiler/BfIRCodeGen.cpp b/IDEHelper/Compiler/BfIRCodeGen.cpp index c9b1445f..04ca959a 100644 --- a/IDEHelper/Compiler/BfIRCodeGen.cpp +++ b/IDEHelper/Compiler/BfIRCodeGen.cpp @@ -3415,7 +3415,8 @@ static void AddFunctionSimplificationPasses(llvm::legacy::PassManagerBase &MPM, //if (EnableGVNHoist) if (options.mEnableGVNHoist) MPM.add(llvm::createGVNHoistPass()); - if (options.mEnableGVNSink) { + if (options.mEnableGVNSink) + { MPM.add(llvm::createGVNSinkPass()); MPM.add(llvm::createCFGSimplificationPass()); } @@ -4047,7 +4048,7 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen { // Ask the target to add backend passes as necessary. if (target->addPassesToEmitFile(PM, out, NULL, - llvm::TargetMachine::CGFT_ObjectFile, + (codeGenOptions.mAsmKind != BfAsmKind_None) ? llvm::TargetMachine::CGFT_AssemblyFile : llvm::TargetMachine::CGFT_ObjectFile, //TargetMachine::CGFT_AssemblyFile, noVerify /*, StartAfterID, StopAfterID*/)) { @@ -4110,6 +4111,12 @@ const char* BfIRCodeGen::GetIntrinsicName(int intrinId) return gIntrinEntries[intrinId].mName; } +void BfIRCodeGen::SetAsmKind(BfAsmKind asmKind) +{ + const char* args[] = {"", (asmKind == BfAsmKind_ATT) ? "-x86-asm-syntax=att" : "-x86-asm-syntax=intel" }; + llvm::cl::ParseCommandLineOptions(2, args); +} + #ifdef BF_PLATFORM_LINUX //HACK: I don't know why this is needed, but we get link errors if we don't have it. int BF_LinuxFixLinkage() diff --git a/IDEHelper/Compiler/BfIRCodeGen.h b/IDEHelper/Compiler/BfIRCodeGen.h index 394ea587..61be6975 100644 --- a/IDEHelper/Compiler/BfIRCodeGen.h +++ b/IDEHelper/Compiler/BfIRCodeGen.h @@ -141,6 +141,7 @@ public: static int GetIntrinsicId(const StringImpl& name); static const char* GetIntrinsicName(int intrinId); + static void SetAsmKind(BfAsmKind asmKind); }; NS_BF_END diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 2347d953..2e85902c 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -4407,11 +4407,6 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary& usedStrin typeFlags |= BfTypeFlags_Union; if (type->IsDelegate()) typeFlags |= BfTypeFlags_Delegate; - if (typeInstance != NULL) - { - if (typeInstance->mTypeDef == mCompiler->mPointerTTypeDef) - typeFlags |= BfTypeFlags_Sys_PointerT; - } if (type->WantsGCMarking()) typeFlags |= BfTypeFlags_WantsMarking; @@ -20413,7 +20408,7 @@ void BfModule::DbgFinish() needForceLinking = true; } - if (needForceLinking) + if ((needForceLinking) && (mProject->mCodeGenOptions.mAsmKind == BfAsmKind_None)) { BfMethodState methodState; SetAndRestoreValue prevMethodState(mCurMethodState, &methodState); @@ -20510,13 +20505,6 @@ bool BfModule::Finish() BF_ASSERT((int)mOutFileNames.size() >= mExtensionCount); bool writeModule = mBfIRBuilder->HasExports(); -// if ((!writeModule) && (!IsOptimized())) -// { -// CreateForceLinkMarker(this); -// mHasForceLinkMarker = true; -// writeModule = true; -// } - String outputPath; BfCodeGenOptions codeGenOptions = mProject->mCodeGenOptions; diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index 542a8861..4b2736b1 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -3468,6 +3468,11 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance) attributes = attributes->mNextAttribute; } + if ((mProject != NULL) && (mProject->mAlwaysIncludeAll) && (methodDef->mBody != NULL)) + { + implRequired = true; + declRequired = true; + } if (typeInstance->IsInterface()) declRequired = true; @@ -8671,7 +8676,9 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp // * <-> Var if ((typedVal.mType->IsVar()) || (toType->IsVar())) { - BF_ASSERT((mCurMethodInstance->mIsUnspecialized) || (mCurMethodState->mClosureState != NULL) || (mHadVarUsage)); + BF_ASSERT(((mCurMethodInstance != NULL) && (mCurMethodInstance->mIsUnspecialized)) || + ((mCurMethodState != NULL) && (mCurMethodState->mClosureState != NULL)) || + (mHadVarUsage)); return GetDefaultValue(toType); } diff --git a/IDEHelper/Compiler/BfSystem.cpp b/IDEHelper/Compiler/BfSystem.cpp index 236703d4..d6295a9c 100644 --- a/IDEHelper/Compiler/BfSystem.cpp +++ b/IDEHelper/Compiler/BfSystem.cpp @@ -9,6 +9,7 @@ #include "BfAutoComplete.h" #include "BfResolvePass.h" #include "MemReporter.h" +#include "BfIRCodeGen.h" #include "BeefySysLib/util/AllocDebug.h" @@ -840,8 +841,11 @@ bool BfTypeDef::HasSource(BfSource* source) BfProject::BfProject() { mDisabled = false; + mSingleModule = false; mTargetType = BfTargetType_BeefConsoleApplication; mBuildConfigChanged = false; + mSingleModule = false; + mAlwaysIncludeAll = false; mSystem = NULL; mIdx = -1; } @@ -3588,7 +3592,7 @@ BF_EXPORT void BF_CALLTYPE BfProject_SetDisabled(BfProject* bfProject, bool disa } BF_EXPORT void BF_CALLTYPE BfProject_SetOptions(BfProject* bfProject, int targetType, const char* startupObject, const char* preprocessorMacros, - int optLevel, int ltoType, bool mergeFunctions, bool combineLoads, bool vectorizeLoops, bool vectorizeSLP) + int optLevel, int ltoType, BfProjectFlags flags) { bfProject->mTargetType = (BfTargetType)targetType; bfProject->mStartupObject = startupObject; @@ -3596,11 +3600,27 @@ BF_EXPORT void BF_CALLTYPE BfProject_SetOptions(BfProject* bfProject, int target BfCodeGenOptions codeGenOptions; codeGenOptions.mOptLevel = (BfOptLevel)optLevel; codeGenOptions.mLTOType = (BfLTOType)ltoType; - codeGenOptions.mMergeFunctions = mergeFunctions; - codeGenOptions.mLoadCombine = combineLoads; - codeGenOptions.mLoopVectorize = vectorizeLoops; - codeGenOptions.mSLPVectorize = vectorizeSLP; + codeGenOptions.mMergeFunctions = (flags & BfProjectFlags_MergeFunctions) != 0; + codeGenOptions.mLoadCombine = (flags & BfProjectFlags_CombineLoads) != 0; + codeGenOptions.mLoopVectorize = (flags & BfProjectFlags_VectorizeLoops) != 0; + codeGenOptions.mSLPVectorize = (flags & BfProjectFlags_VectorizeSLP) != 0; + if ((flags & BfProjectFlags_AsmOutput) != 0) + { + static bool setLLVMAsmKind = false; + if ((flags & BfProjectFlags_AsmOutput_ATT) != 0) + codeGenOptions.mAsmKind = BfAsmKind_ATT; + else + codeGenOptions.mAsmKind = BfAsmKind_Intel; + + if (!setLLVMAsmKind) + { + setLLVMAsmKind = true; + BfIRCodeGen::SetAsmKind(codeGenOptions.mAsmKind); + } + } bfProject->mCodeGenOptions = codeGenOptions; + bfProject->mSingleModule = (flags & BfProjectFlags_SingleModule) != 0; + bfProject->mAlwaysIncludeAll = (flags & BfProjectFlags_AlwaysIncludeAll) != 0; bfProject->mPreprocessorMacros.Clear(); diff --git a/IDEHelper/Compiler/BfSystem.h b/IDEHelper/Compiler/BfSystem.h index c237daff..851957d0 100644 --- a/IDEHelper/Compiler/BfSystem.h +++ b/IDEHelper/Compiler/BfSystem.h @@ -154,7 +154,7 @@ enum BfTypeFlags BfTypeFlags_SizedArray = 0x0800, BfTypeFlags_Splattable = 0x1000, BfTypeFlags_Union = 0x2000, - BfTypeFlags_Sys_PointerT = 0x4000, + // BfTypeFlags_WantsMarking = 0x8000, BfTypeFlags_Delegate = 0x10000, BfTypeFlags_HasDestructor = 0x20000, @@ -209,6 +209,13 @@ enum BfSIMDSetting BfSIMDSetting_AVX2, }; +enum BfAsmKind +{ + BfAsmKind_None, + BfAsmKind_ATT, + BfAsmKind_Intel, +}; + enum BfOptLevel { BfOptLevel_NotSet = -1, @@ -240,8 +247,9 @@ struct BfCodeGenOptions bool mIsHotCompile; bool mWriteObj; + BfAsmKind mAsmKind; bool mWriteToLib; - bool mWriteLLVMIR; + bool mWriteLLVMIR; int16 mVirtualMethodOfs; int16 mDynSlotOfs; @@ -289,8 +297,9 @@ struct BfCodeGenOptions BfCodeGenOptions() { - mIsHotCompile = false; + mIsHotCompile = false; mWriteObj = true; + mAsmKind = BfAsmKind_None; mWriteToLib = false; mWriteLLVMIR = false; mVirtualMethodOfs = 0; @@ -921,6 +930,19 @@ enum BfTargetType BfTargetType_BeefTest }; +enum BfProjectFlags +{ + BfProjectFlags_None = 0, + BfProjectFlags_MergeFunctions = 1, + BfProjectFlags_CombineLoads = 2, + BfProjectFlags_VectorizeLoops = 4, + BfProjectFlags_VectorizeSLP = 8, + BfProjectFlags_SingleModule = 0x10, + BfProjectFlags_AsmOutput = 0x20, + BfProjectFlags_AsmOutput_ATT = 0x40, + BfProjectFlags_AlwaysIncludeAll = 0x80, +}; + class BfProject { public: @@ -930,6 +952,8 @@ public: BfTargetType mTargetType; BfCodeGenOptions mCodeGenOptions; bool mDisabled; + bool mSingleModule; + bool mAlwaysIncludeAll; int mIdx; String mStartupObject; diff --git a/bin/build.sh b/bin/build.sh index 408b7da5..b857ea4c 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -41,7 +41,7 @@ cmake --build . cd ../IDE/dist if [ ! -L libBeefRT_d.so ]; then ln -s ../../jbuild_d/Debug/bin/libBeefRT_d.so libBeefRT_d.so - ln -s ../../jbuild_d/Debug/bin/libBeefySysLib_d.so libBeefySysLib_d.so + ln -s ../../jbuild_d/Debug/bin/libBeefySysLib_d.so libBeefySysLib_d.so ln -s ../../jbuild_d/Debug/bin/libIDEHelper_d.so libIDEHelper_d.so ln -s ../../jbuild/Release/bin/libBeefRT.so libBeefRT.so @@ -52,7 +52,7 @@ fi ### DEBUG ### echo Building BeefBuild_bootd -../../jbuild_d/Debug/bin/BeefBoot --out="BeefBuild_bootd" --src=../src --src=../../BeefBuild/src --src=../../BeefLibs/corlib/src --src=../../BeefLibs/Beefy2D/src --define=CLI --define=DEBUG --startup=BeefBuild.Program --linkparams="./libBeefRT_d.so ./libIDEHelper_d.so ./libBeefySysLib_d.so ../../extern/llvm_linux_8_0_0/lib/libLLVMCore.a ../../extern/llvm_linux_8_0_0/lib/libLLVMMC.a ../../extern/llvm_linux_8_0_0/lib/libLLVMMCParser.a ../../extern/llvm_linux_8_0_0/lib/libLLVMCodeGen.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Disassembler.a ../../extern/llvm_linux_8_0_0/lib/libLLVMMCDisassembler.a ../../extern/llvm_linux_8_0_0/lib/libLLVMSupport.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Info.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Utils.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86AsmPrinter.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Desc.a ../../extern/llvm_linux_8_0_0/lib/libLLVMObject.a ../../extern/llvm_linux_8_0_0/lib/libLLVMBitReader.a ../../extern/llvm_linux_8_0_0/lib/libLLVMAsmParser.a ../../extern/llvm_linux_8_0_0/lib/libLLVMTarget.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86CodeGen.a ../../extern/llvm_linux_8_0_0/lib/libLLVMScalarOpts.a ../../extern/llvm_linux_8_0_0/lib/libLLVMInstCombine.a ../../extern/llvm_linux_8_0_0/lib/libLLVMSelectionDAG.a ../../extern/llvm_linux_8_0_0/lib/libLLVMProfileData.a ../../extern/llvm_linux_8_0_0/lib/libLLVMTransformUtils.a ../../extern/llvm_linux_8_0_0/lib/libLLVMAnalysis.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86AsmParser.a ../../extern/llvm_linux_8_0_0/lib/libLLVMAsmPrinter.a ../../extern/llvm_linux_8_0_0/lib/libLLVMBitWriter.a ../../extern/llvm_linux_8_0_0/lib/libLLVMVectorize.a ../../extern/llvm_linux_8_0_0/lib/libLLVMipo.a ../../extern/llvm_linux_8_0_0/lib/libLLVMInstrumentation.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDebugInfoDWARF.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDebugInfoPDB.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDebugInfoCodeView.a ../../extern/llvm_linux_8_0_0/lib/libLLVMGlobalISel.a ../../extern/llvm_linux_8_0_0/lib/libLLVMBinaryFormat.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDemangle.a -ltinfo -Wl,-rpath -Wl,." +../../jbuild_d/Debug/bin/BeefBoot --out="BeefBuild_bootd" --src=../src --src=../../BeefBuild/src --src=../../BeefLibs/corlib/src --src=../../BeefLibs/Beefy2D/src --define=CLI --define=DEBUG --startup=BeefBuild.Program --linkparams="./libBeefRT_d.so ./libIDEHelper_d.so ./libBeefySysLib_d.so ../../extern/llvm_linux_8_0_0/lib/libLLVMCore.a ../../extern/llvm_linux_8_0_0/lib/libLLVMMC.a ../../extern/llvm_linux_8_0_0/lib/libLLVMMCParser.a ../../extern/llvm_linux_8_0_0/lib/libLLVMCodeGen.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Disassembler.a ../../extern/llvm_linux_8_0_0/lib/libLLVMMCDisassembler.a ../../extern/llvm_linux_8_0_0/lib/libLLVMSupport.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Info.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Utils.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86AsmPrinter.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86Desc.a ../../extern/llvm_linux_8_0_0/lib/libLLVMObject.a ../../extern/llvm_linux_8_0_0/lib/libLLVMBitReader.a ../../extern/llvm_linux_8_0_0/lib/libLLVMAsmParser.a ../../extern/llvm_linux_8_0_0/lib/libLLVMTarget.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86CodeGen.a ../../extern/llvm_linux_8_0_0/lib/libLLVMScalarOpts.a ../../extern/llvm_linux_8_0_0/lib/libLLVMInstCombine.a ../../extern/llvm_linux_8_0_0/lib/libLLVMSelectionDAG.a ../../extern/llvm_linux_8_0_0/lib/libLLVMProfileData.a ../../extern/llvm_linux_8_0_0/lib/libLLVMTransformUtils.a ../../extern/llvm_linux_8_0_0/lib/libLLVMAnalysis.a ../../extern/llvm_linux_8_0_0/lib/libLLVMX86AsmParser.a ../../extern/llvm_linux_8_0_0/lib/libLLVMAsmPrinter.a ../../extern/llvm_linux_8_0_0/lib/libLLVMBitWriter.a ../../extern/llvm_linux_8_0_0/lib/libLLVMVectorize.a ../../extern/llvm_linux_8_0_0/lib/libLLVMipo.a ../../extern/llvm_linux_8_0_0/lib/libLLVMInstrumentation.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDebugInfoDWARF.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDebugInfoPDB.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDebugInfoCodeView.a ../../extern/llvm_linux_8_0_0/lib/libLLVMGlobalISel.a ../../extern/llvm_linux_8_0_0/lib/libLLVMBinaryFormat.a ../../extern/llvm_linux_8_0_0/lib/libLLVMDemangle.a -ltinfo -Wl,-rpath -Wl,\$ORIGIN" echo Building BeefBuild_d ./BeefBuild_bootd -clean -proddir=../../BeefBuild -config=Debug -platform=Linux64 #./BeefBuild_d -proddir=../../TestApp @@ -63,7 +63,7 @@ echo Testing IDEHelper/Tests in BeefBuild_d ### RELEASE ### echo Building BeefBuild_boot -../../jbuild/Release/bin/BeefBoot --out="BeefBuild_boot" --src=../src --src=../../BeefBuild/src --src=../../BeefLibs/corlib/src --src=../../BeefLibs/Beefy2D/src --define=CLI --define=DEBUG --startup=BeefBuild.Program --linkparams="./libBeefRT.so ./libIDEHelper.so ./libBeefySysLib.so ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMCore.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMMC.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMMCParser.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMCodeGen.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Disassembler.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMMCDisassembler.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMSupport.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Info.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Utils.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86AsmPrinter.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Desc.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMObject.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMBitReader.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMAsmParser.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMTarget.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86CodeGen.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMScalarOpts.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMInstCombine.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMSelectionDAG.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMProfileData.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMTransformUtils.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMAnalysis.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86AsmParser.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMAsmPrinter.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMBitWriter.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMVectorize.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMipo.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMInstrumentation.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDebugInfoDWARF.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDebugInfoPDB.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDebugInfoCodeView.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMGlobalISel.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMBinaryFormat.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDemangle.a -ltinfo -Wl,-rpath -Wl,." +../../jbuild/Release/bin/BeefBoot --out="BeefBuild_boot" --src=../src --src=../../BeefBuild/src --src=../../BeefLibs/corlib/src --src=../../BeefLibs/Beefy2D/src --define=CLI --define=DEBUG --startup=BeefBuild.Program --linkparams="./libBeefRT.so ./libIDEHelper.so ./libBeefySysLib.so ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMCore.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMMC.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMMCParser.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMCodeGen.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Disassembler.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMMCDisassembler.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMSupport.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Info.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Utils.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86AsmPrinter.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86Desc.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMObject.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMBitReader.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMAsmParser.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMTarget.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86CodeGen.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMScalarOpts.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMInstCombine.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMSelectionDAG.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMProfileData.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMTransformUtils.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMAnalysis.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMX86AsmParser.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMAsmPrinter.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMBitWriter.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMVectorize.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMipo.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMInstrumentation.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDebugInfoDWARF.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDebugInfoPDB.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDebugInfoCodeView.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMGlobalISel.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMBinaryFormat.a ../../extern/llvm_linux_rel_8_0_0/lib/libLLVMDemangle.a -ltinfo -Wl,-rpath -Wl,\$ORIGIN" echo Building BeedBuild ./BeefBuild_boot -clean -proddir=../../BeefBuild -config=Release -platform=Linux64 #./BeefBuild_d -proddir=../../TestApp