Skip to content

Commit

Permalink
chore: fix debug builds by adding release specific flags in release only
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jul 11, 2021
1 parent 3aa9916 commit 2b912a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 5 additions & 4 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ dflags "-vgc" "-preview=dip25" "-preview=dip1000" "-preview=dip1008" "-preview=f
/* dflags "-preview=inclusiveincontracts" platform="dmd" // only on dmd */
/* dflags "-preview=dip1021" platform="posix-ldc" // "breaks the build */

# link time optimizations
dflags "--flto=full" "--ffast-math" platfrom="ldc"
buildType "release-nobounds" {
buildOptions "releaseMode" "optimize" "inline" "noBoundsCheck"

# support SIMD, etc
dflags "-mcpu=native"
# link time optimizations
dflags "--flto=full" "--ffast-math" platfrom="ldc"
}

buildType "debug-sanitize-address" platform="ldc" {
dflags "--fsanitize=address" "--link-defaultlib-debug"
Expand Down
4 changes: 1 addition & 3 deletions src/native/libc.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module minijson.libc;

import minijson.lib : minifyString;

extern (C):

/**
Minify the given JSON string using C ABI.
Expand All @@ -14,7 +12,7 @@ extern (C):
Return:
the minified json string
*/
auto minifyString(in char* jsonCString, in bool hasComment = false)
extern (C) auto c_minifyString(in char* jsonCString, in bool hasComment = false)
{
import std : fromStringz, toStringz;

Expand Down

0 comments on commit 2b912a1

Please sign in to comment.