-remove "SIMD" option from "compile_wasm.py" (new Emscripten hasn't that option)
-removed some unnecessary variables -started C-API implemantation: * added C-API option to Meson (build included to main library) * refactored some code (moved some code form templates to final code, removed delegates from system) * moved templates outside EntityManager to make it possible to use in different functions
This commit is contained in:
parent
bcd9ee4aa0
commit
0d08b8532a
6 changed files with 714 additions and 406 deletions
7
c-api/meson.build
Normal file
7
c-api/meson.build
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
src += files(
|
||||||
|
'manager.d'
|
||||||
|
)
|
||||||
|
|
||||||
|
c_src = files(
|
||||||
|
'test.c'
|
||||||
|
)
|
||||||
|
|
@ -75,7 +75,7 @@ for arg in sys.argv[1:]:
|
||||||
elif(arg == '-opt'):
|
elif(arg == '-opt'):
|
||||||
shared_flags += '-O3 '
|
shared_flags += '-O3 '
|
||||||
ldc_flags += '-release -enable-inlining '
|
ldc_flags += '-release -enable-inlining '
|
||||||
emc_flags += '--llvm-lto 3 -s SIMD=1 '
|
emc_flags += '--llvm-lto 3 '
|
||||||
elif(arg == '-quiet'):
|
elif(arg == '-quiet'):
|
||||||
emc_flags += "-Wl,--no-check-features "
|
emc_flags += "-Wl,--no-check-features "
|
||||||
elif(arg == '--clean'):
|
elif(arg == '--clean'):
|
||||||
|
|
|
||||||
11
meson.build
11
meson.build
|
|
@ -5,11 +5,13 @@ betterC_opt = get_option('betterC')
|
||||||
BuildDemos_opt = get_option('BuildDemos')
|
BuildDemos_opt = get_option('BuildDemos')
|
||||||
BuildTests_opt = get_option('BuildTests')
|
BuildTests_opt = get_option('BuildTests')
|
||||||
LTO_otp = get_option('LTO')
|
LTO_otp = get_option('LTO')
|
||||||
|
C_API_opt = get_option('C-API')
|
||||||
|
|
||||||
summary('betterC enabled', betterC_opt)
|
summary('betterC enabled', betterC_opt)
|
||||||
summary('build demos', BuildDemos_opt)
|
summary('build demos', BuildDemos_opt)
|
||||||
summary('build tests', BuildTests_opt)
|
summary('build tests', BuildTests_opt)
|
||||||
summary('LTO enabled', LTO_otp)
|
summary('LTO enabled', LTO_otp)
|
||||||
|
summary('C-API enabled', C_API_opt)
|
||||||
|
|
||||||
meson_minimum_version = '>=0.57.1'
|
meson_minimum_version = '>=0.57.1'
|
||||||
assert(meson.version().version_compare(meson_minimum_version), 'Newer verson of meson required, current version: @0@, required: @1@'.format(meson.version(), meson_minimum_version))
|
assert(meson.version().version_compare(meson_minimum_version), 'Newer verson of meson required, current version: @0@, required: @1@'.format(meson.version(), meson_minimum_version))
|
||||||
|
|
@ -18,7 +20,14 @@ assert(meson.version().version_compare(meson_minimum_version), 'Newer verson of
|
||||||
src = files()
|
src = files()
|
||||||
subdir('source')
|
subdir('source')
|
||||||
|
|
||||||
inc = include_directories('source/')
|
inc = [include_directories('source/')]
|
||||||
|
|
||||||
|
#C API files
|
||||||
|
if C_API_opt
|
||||||
|
c_src = files()
|
||||||
|
subdir('c-api')
|
||||||
|
inc += include_directories('c-api/')
|
||||||
|
endif
|
||||||
|
|
||||||
# Arguments
|
# Arguments
|
||||||
args = []
|
args = []
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@ option('betterC', type: 'boolean', value: false)
|
||||||
option('BuildDemos', type: 'boolean', value: false)
|
option('BuildDemos', type: 'boolean', value: false)
|
||||||
option('BuildTests', type: 'boolean', value: false)
|
option('BuildTests', type: 'boolean', value: false)
|
||||||
option('LTO', type: 'boolean', value: false)
|
option('LTO', type: 'boolean', value: false)
|
||||||
|
option('C-API', type: 'boolean', value: false)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -89,7 +89,7 @@ struct System
|
||||||
return cast(const(char)[]) m_name;
|
return cast(const(char)[]) m_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
package:
|
//package:
|
||||||
|
|
||||||
void destroy()
|
void destroy()
|
||||||
{
|
{
|
||||||
|
|
@ -170,7 +170,7 @@ package:
|
||||||
|
|
||||||
//void function(ref EntityManager.CallData data) m_update;
|
//void function(ref EntityManager.CallData data) m_update;
|
||||||
void* m_update; ///workaroud for DMD bug with upper line
|
void* m_update; ///workaroud for DMD bug with upper line
|
||||||
void delegate() m_update_delegate;
|
//void delegate() m_update_delegate;
|
||||||
|
|
||||||
//void function(void* system_pointer) m_enable;
|
//void function(void* system_pointer) m_enable;
|
||||||
//void function(void* system_pointer) m_disable;
|
//void function(void* system_pointer) m_disable;
|
||||||
|
|
@ -198,6 +198,6 @@ package:
|
||||||
|
|
||||||
//void function(ref EntityManager.CallData data) m_initialize;
|
//void function(ref EntityManager.CallData data) m_initialize;
|
||||||
//void function(ref EntityManager.CallData data) m_deinitilize;
|
//void function(ref EntityManager.CallData data) m_deinitilize;
|
||||||
void* m_initialize;
|
// void* m_initialize;
|
||||||
void* m_deinitilize;
|
// void* m_deinitilize;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue