diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | appveyor.yml | 11 | ||||
-rw-r--r-- | ci/deps.sh | 3 | ||||
-rw-r--r-- | compiler/commands.nim | 4 | ||||
-rw-r--r-- | compiler/extccomp.nim | 49 | ||||
-rw-r--r-- | compiler/msgs.nim | 4 |
6 files changed, 5 insertions, 70 deletions
diff --git a/.travis.yml b/.travis.yml index 96f2eb1a3..6d8d8b7fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,14 +22,12 @@ addons: before_script: - set -e - - curl --out fasm-1.71.39.tgz https://nim-lang.org/download/fasm-1.71.39.tgz - - tar xvf fasm-1.71.39.tgz - git clone --depth 1 https://github.com/nim-lang/csources.git - cd csources - sh build.sh - cd .. - sed -i -e 's,cc = gcc,cc = clang,' config/nim.cfg - - export PATH=$(pwd)/bin:$(pwd)/fasm:$PATH + - export PATH=$(pwd)/bin:$PATH script: - nim c koch - ./koch boot -d:nimCoroutines diff --git a/appveyor.yml b/appveyor.yml index dff7e91eb..9199755d9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,6 @@ version: '{build}' cache: - x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z - sqlite-dll-win64-x64-3160200.zip -- fasmw17159.zip # - i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z matrix: @@ -16,18 +15,12 @@ environment: MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z SQLITE_URL: http://www.sqlite.org/2017/sqlite-dll-win64-x64-3160200.zip SQLITE_ARCHIVE: sqlite-dll-win64-x64-3160200.zip - FASM_DIR: fasm - FASM_URL: https://flatassembler.net/fasmw17159.zip - FASM_ARCHIVE: fasmw17159.zip platform: x64 # - MINGW_DIR: mingw32 # MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download # MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z # SQLITE_URL: http://www.sqlite.org/2017/sqlite-dll-win32-x86-3160200.zip # SQLITE_ARCHIVE: sqlite-dll-win32-x86-3160200.zip - # FASM_DIR: fasm - # FASM_URL: https://flatassembler.net/fasmw17159.zip - # FASM_ARCHIVE: fasmw17159.zip # platform: x86 install: @@ -38,9 +31,7 @@ install: - 7z x -y "%SQLITE_ARCHIVE%" -o"%CD%\DIST"> nul - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" - 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\DIST"> nul - - IF not exist "%FASM_ARCHIVE%" appveyor DownloadFile "%FASM_URL%" -FileName "%FASM_ARCHIVE%" - - 7z x -y "%FASM_ARCHIVE%" -o"%CD%\DIST\%FASM_DIR%" > nul - - SET PATH=%CD%\DIST\%MINGW_DIR%\BIN;%CD%\BIN;%CD%\DIST\%FASM_DIR%;%PATH% + - SET PATH=%CD%\DIST\%MINGW_DIR%\BIN;%CD%\BIN;%PATH% - IF "%PLATFORM%" == "x64" ( copy C:\OpenSSL-Win64\libeay32.dll %CD%\BIN\libeay64.dll & copy C:\OpenSSL-Win64\libeay32.dll %CD%\BIN\libeay32.dll & copy C:\OpenSSL-Win64\libssl32.dll %CD%\BIN\libssl64.dll & copy C:\OpenSSL-Win64\libssl32.dll %CD%\BIN\libssl32.dll ) ELSE ( copy C:\OpenSSL-Win32\libeay32.dll %CD%\BIN\libeay32.dll & copy C:\OpenSSL-Win32\libssl32.dll %CD%\BIN\libssl32.dll ) - IF "%PLATFORM%" == "x64" ( copy %CD%\DIST\sqlite3.dll %CD%\BIN\sqlite3_64.dll ) ELSE ( copy %CD%\DIST\sqlite3.dll %CD%\BIN\sqlite3_32.dll ) diff --git a/ci/deps.sh b/ci/deps.sh index 3385a213b..7471785a0 100644 --- a/ci/deps.sh +++ b/ci/deps.sh @@ -3,11 +3,10 @@ echo "Running on $CI_RUNNER_ID ($CI_RUNNER_DESCRIPTION) with tags $CI_RUNNER_TAG # Packages apt-get update -qq -apt-get install -y -qq build-essential git libcurl4-openssl-dev libsdl1.2-dev libgc-dev nodejs fasm +apt-get install -y -qq build-essential git libcurl4-openssl-dev libsdl1.2-dev libgc-dev nodejs gcc -v -fasm -v export PATH=$(pwd)/bin:$PATH # Nimble deps diff --git a/compiler/commands.nim b/compiler/commands.nim index 74503a414..8dd7439b6 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -640,10 +640,6 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; of "experimental": expectNoArg(switch, arg, pass, info) gExperimentalMode = true - of "assembler": - cAssembler = nameToCC(arg) - if cAssembler notin cValidAssemblers: - localError(info, errGenerated, "'$1' is not a valid assembler." % [arg]) of "nocppexceptions": expectNoArg(switch, arg, pass, info) incl(gGlobalOptions, optNoCppExceptions) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 1b068385a..a84d8ae22 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -21,7 +21,7 @@ import type TSystemCC* = enum ccNone, ccGcc, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc, - ccTcc, ccPcc, ccUcc, ccIcl, asmFasm + ccTcc, ccPcc, ccUcc, ccIcl TInfoCCProp* = enum # properties of the C compiler: hasSwitchRange, # CC allows ranges in switch statements (GNU C) hasComputedGoto, # CC has computed goto (GNU C extension) @@ -320,31 +320,6 @@ compiler ucc: packedPragma: "", # XXX: not supported yet props: {}) -# fasm assembler -compiler fasm: - result = ( - name: "fasm", - objExt: "o", - optSpeed: "", - optSize: "", - compilerExe: "fasm", - cppCompiler: "fasm", - compileTmpl: "$file $objfile", - buildGui: "", - buildDll: "", - buildLib: "", - linkerExe: "", - linkTmpl: "", - includeCmd: "", - linkDirCmd: "", - linkLibCmd: "", - debug: "", - pic: "", - asmStmtFrmt: "", - structStmtFmt: "", - packedPragma: "", - props: {}) - const CC*: array[succ(low(TSystemCC))..high(TSystemCC), TInfoCC] = [ gcc(), @@ -358,22 +333,17 @@ const tcc(), pcc(), ucc(), - icl(), - fasm()] + icl()] hExt* = ".h" var cCompiler* = ccGcc # the used compiler - cAssembler* = ccNone gMixedMode*: bool # true if some module triggered C++ codegen cIncludes*: seq[string] = @[] # directories to search for included files cLibs*: seq[string] = @[] # directories to search for lib files cLinkedLibs*: seq[string] = @[] # libraries to link -const - cValidAssemblers* = {asmFasm} - # implementation proc libNameTmpl(): string {.inline.} = @@ -581,21 +551,6 @@ proc getLinkerExe(compiler: TSystemCC): string = proc getCompileCFileCmd*(cfile: Cfile): string = var c = cCompiler - if cfile.cname.endswith(".asm"): - var customAssembler = getConfigVar("assembler") - if customAssembler.len > 0: - c = nameToCC(customAssembler) - else: - if targetCPU == cpuI386 or targetCPU == cpuAmd64: - c = asmFasm - else: - c = ccNone - - if c == ccNone: - rawMessage(errExternalAssemblerNotFound, "") - elif c notin cValidAssemblers: - rawMessage(errExternalAssemblerNotValid, customAssembler) - var options = cFileSpecificOptions(cfile.cname) var exe = getConfigVar(c, ".exe") if exe.len == 0: exe = c.getCompilerExe(cfile.cname) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 49e4fa184..2523958f0 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -108,8 +108,6 @@ type errCannotInferReturnType, errGenericLambdaNotAllowed, errCompilerDoesntSupportTarget, - errExternalAssemblerNotFound, - errExternalAssemblerNotValid, errUser, warnCannotOpenFile, warnOctalEscape, warnXIsNeverRead, warnXmightNotBeenInit, @@ -372,8 +370,6 @@ const "it is used as an operand to another routine and the types " & "of the generic paramers can be inferred from the expected signature.", errCompilerDoesntSupportTarget: "The current compiler \'$1\' doesn't support the requested compilation target", - errExternalAssemblerNotFound: "External assembler not found", - errExternalAssemblerNotValid: "External assembler '$1' is not a valid assembler", errUser: "$1", warnCannotOpenFile: "cannot open \'$1\'", warnOctalEscape: "octal escape sequences do not exist; leading zero is ignored", |