use mold for debug builds
This commit is contained in:
4
Makefile
4
Makefile
@@ -3,7 +3,7 @@ debug: FORCE
|
|||||||
meson compile -C build_dbg
|
meson compile -C build_dbg
|
||||||
|
|
||||||
release: FORCE
|
release: FORCE
|
||||||
meson setup -Dbuildtype=release -Db_lto=true -Db_lto_threads=4 -Db_ndebug=true -Db_pgo=use build_release
|
meson setup -Dbuildtype=release -Db_lto=true -Db_ndebug=true -Db_pgo=use build_release
|
||||||
meson compile -C build_release
|
meson compile -C build_release
|
||||||
|
|
||||||
sanitize: FORCE
|
sanitize: FORCE
|
||||||
@@ -11,7 +11,7 @@ sanitize: FORCE
|
|||||||
meson compile -C build_sani
|
meson compile -C build_sani
|
||||||
|
|
||||||
small: FORCE
|
small: FORCE
|
||||||
meson setup -Dbuildtype=minsize -Db_lto=true -Db_lto_threads=4 -Db_ndebug=true -Db_pgo=use build_small
|
meson setup -Dbuildtype=minsize -Db_lto=true -Db_ndebug=true -Db_pgo=use build_small
|
||||||
meson compile -C build_small
|
meson compile -C build_small
|
||||||
|
|
||||||
web: FORCE
|
web: FORCE
|
||||||
|
|||||||
11
meson.build
11
meson.build
@@ -2,6 +2,8 @@ project('prosperon', ['c', 'cpp'], default_options : [ 'cpp_std=c++11'])
|
|||||||
|
|
||||||
libtype = get_option('default_library')
|
libtype = get_option('default_library')
|
||||||
|
|
||||||
|
link = []
|
||||||
|
|
||||||
if not get_option('editor')
|
if not get_option('editor')
|
||||||
add_project_arguments('-DNEDITOR', language:'c')
|
add_project_arguments('-DNEDITOR', language:'c')
|
||||||
endif
|
endif
|
||||||
@@ -29,13 +31,12 @@ cc = meson.get_compiler('c')
|
|||||||
if host_machine.system() == 'linux'
|
if host_machine.system() == 'linux'
|
||||||
deps += cc.find_library('asound', required:true)
|
deps += cc.find_library('asound', required:true)
|
||||||
deps += [dependency('x11'), dependency('xi'), dependency('xcursor'), dependency('egl'), dependency('gl')]
|
deps += [dependency('x11'), dependency('xi'), dependency('xcursor'), dependency('egl'), dependency('gl')]
|
||||||
|
link += '-fuse-ld=mold' # use mold, which is very fast, for debug builds
|
||||||
endif
|
endif
|
||||||
|
|
||||||
link = []
|
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
deps += cc.find_library('d3d11')
|
deps += cc.find_library('d3d11')
|
||||||
link += '-static'
|
link += '-static' # Required to pack in mingw dlls on cross compilation
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() == 'emscripten'
|
if host_machine.system() == 'emscripten'
|
||||||
@@ -103,4 +104,8 @@ prosperon = executable('prosperon', sources,
|
|||||||
link_args: link
|
link_args: link
|
||||||
)
|
)
|
||||||
|
|
||||||
|
prosperon_dep = declare_dependency(
|
||||||
|
link_with:prosperon
|
||||||
|
)
|
||||||
|
|
||||||
test('sanity', prosperon)
|
test('sanity', prosperon)
|
||||||
@@ -10,4 +10,7 @@ exe_wrapper = 'wine64'
|
|||||||
system = 'windows'
|
system = 'windows'
|
||||||
cpu_family = 'x86_64'
|
cpu_family = 'x86_64'
|
||||||
cpu = 'x86_64'
|
cpu = 'x86_64'
|
||||||
endian = 'little'
|
endian = 'little'
|
||||||
|
|
||||||
|
[properties]
|
||||||
|
link_args = ['-static']
|
||||||
@@ -223,7 +223,7 @@ var sheetsize = 1024;
|
|||||||
function pack_into_sheet(images)
|
function pack_into_sheet(images)
|
||||||
{
|
{
|
||||||
if (!Array.isArray(images)) images = [images];
|
if (!Array.isArray(images)) images = [images];
|
||||||
if (images[0].texture.width > 3 && images[0].texture.height > 3) return;
|
if (images[0].texture.width > 300 && images[0].texture.height > 300) return;
|
||||||
sheet_frames = sheet_frames.concat(images);
|
sheet_frames = sheet_frames.concat(images);
|
||||||
var sizes = sheet_frames.map(x => [x.rect.width*x.texture.width, x.rect.height*x.texture.height]);
|
var sizes = sheet_frames.map(x => [x.rect.width*x.texture.width, x.rect.height*x.texture.height]);
|
||||||
var pos = os.rectpack(sheetsize, sheetsize, sizes);
|
var pos = os.rectpack(sheetsize, sheetsize, sizes);
|
||||||
|
|||||||
Reference in New Issue
Block a user