Merge remote-tracking branch 'origin/devel' into bitsize-pragma
This commit is contained in:
commit
87ab263d52
6 changed files with 27 additions and 9 deletions
14
.travis.yml
14
.travis.yml
|
|
@ -1,10 +1,20 @@
|
||||||
|
sudo: false
|
||||||
language: c
|
language: c
|
||||||
os: linux
|
os:
|
||||||
|
- linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libcurl4-openssl-dev
|
||||||
|
- libsdl1.2-dev
|
||||||
script:
|
script:
|
||||||
- git clone --depth 1 https://github.com/nim-lang/csources.git
|
- git clone --depth 1 https://github.com/nim-lang/csources.git
|
||||||
- cd csources && sh build.sh
|
- cd csources
|
||||||
|
- sh build.sh
|
||||||
|
- cd ..
|
||||||
- ./bin/nim c koch
|
- ./bin/nim c koch
|
||||||
- ./koch boot
|
- ./koch boot
|
||||||
- ./koch boot -d:release
|
- ./koch boot -d:release
|
||||||
after_script:
|
after_script:
|
||||||
|
- export PATH=$(pwd)/bin:$PATH
|
||||||
- ./koch test
|
- ./koch test
|
||||||
|
|
|
||||||
|
|
@ -140,4 +140,7 @@ proc runNimScript*(scriptName: string) =
|
||||||
# ensure we load 'system.nim' again for the real non-config stuff!
|
# ensure we load 'system.nim' again for the real non-config stuff!
|
||||||
resetAllModulesHard()
|
resetAllModulesHard()
|
||||||
vm.globalCtx = nil
|
vm.globalCtx = nil
|
||||||
initDefines()
|
# do not remove the defined symbols
|
||||||
|
#initDefines()
|
||||||
|
undefSymbol("nimscript")
|
||||||
|
undefSymbol("nimconfig")
|
||||||
|
|
|
||||||
|
|
@ -103,15 +103,16 @@ proc readData*(s: Stream, buffer: pointer, bufLen: int): int =
|
||||||
|
|
||||||
proc readAll*(s: Stream): string =
|
proc readAll*(s: Stream): string =
|
||||||
## Reads all available data.
|
## Reads all available data.
|
||||||
result = newString(1000)
|
const bufferSize = 1000
|
||||||
|
result = newString(bufferSize)
|
||||||
var r = 0
|
var r = 0
|
||||||
while true:
|
while true:
|
||||||
let readBytes = readData(s, addr(result[r]), 1000)
|
let readBytes = readData(s, addr(result[r]), bufferSize)
|
||||||
if readBytes < 1000:
|
if readBytes < bufferSize:
|
||||||
setLen(result, r+readBytes)
|
setLen(result, r+readBytes)
|
||||||
break
|
break
|
||||||
inc r, 1000
|
inc r, bufferSize
|
||||||
setLen(result, r+1000)
|
setLen(result, r+bufferSize)
|
||||||
|
|
||||||
proc readData*(s, unused: Stream, buffer: pointer,
|
proc readData*(s, unused: Stream, buffer: pointer,
|
||||||
bufLen: int): int {.deprecated.} =
|
bufLen: int): int {.deprecated.} =
|
||||||
|
|
|
||||||
|
|
@ -1256,7 +1256,7 @@ proc compileOption*(option, arg: string): bool {.
|
||||||
## echo "compiled with optimization for size and uses Boehm's GC"
|
## echo "compiled with optimization for size and uses Boehm's GC"
|
||||||
|
|
||||||
const
|
const
|
||||||
hasThreadSupport = compileOption("threads")
|
hasThreadSupport = compileOption("threads") and not defined(nimscript)
|
||||||
hasSharedHeap = defined(boehmgc) or defined(gogc) # don't share heaps; every thread has its own
|
hasSharedHeap = defined(boehmgc) or defined(gogc) # don't share heaps; every thread has its own
|
||||||
taintMode = compileOption("taintmode")
|
taintMode = compileOption("taintmode")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,7 @@ discard """
|
||||||
msg: '''[NimScript] exec: gcc -v'''
|
msg: '''[NimScript] exec: gcc -v'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
when not defined(definedefine):
|
||||||
|
{.fatal: "wrong nim script configuration".}
|
||||||
|
|
||||||
echo "hello world!"
|
echo "hello world!"
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,6 @@ task listDirs, "lists every subdirectory":
|
||||||
echo "DIR ", x
|
echo "DIR ", x
|
||||||
|
|
||||||
task default, "default target":
|
task default, "default target":
|
||||||
|
--define: definedefine
|
||||||
setCommand "c"
|
setCommand "c"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue