summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-12-03 22:43:23 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-12-03 23:33:25 -0300
commitbf19ce75ceb90d07f97c95b1477e9702e7e88041 (patch)
tree1424139cd6121b7ac3eab7cf6828a83ca42537df
parent22f25011365a06d23a8a7bec7157e3aa00a8e533 (diff)
coro: Enable meson builddevs/lauromoura/coroutines
-rw-r--r--meson.build2
-rw-r--r--meson_options.txt7
-rw-r--r--src/lib/eina/meson.build14
-rw-r--r--src/static_libs/fcontext/meson.build12
-rw-r--r--src/tests/eina/meson.build3
-rw-r--r--src/tests/eo/suite/meson.build3
6 files changed, 37 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index c40d30c185..433e6ec136 100644
--- a/meson.build
+++ b/meson.build
@@ -203,7 +203,7 @@ ecore_evas_wayland_engine_include_dir = []
203 203
204subprojects = [ 204subprojects = [
205# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs 205# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
206['eina' ,[] , false, true, true, true, true, true, [], []], 206['eina' ,[] , false, true, true, true, true, true, [], ['fcontext']],
207['eolian' ,[] , false, true, true, false, true, false, ['eina'], []], 207['eolian' ,[] , false, true, true, false, true, false, ['eina'], []],
208['eo' ,[] , false, true, false, true, true, false, ['eina'], []], 208['eo' ,[] , false, true, false, true, true, false, ['eina'], []],
209['efl' ,[] , false, true, false, false, true, false, ['eo'], []], 209['efl' ,[] , false, true, false, false, true, false, ['eo'], []],
diff --git a/meson_options.txt b/meson_options.txt
index 296b3b88d8..0dbca6f319 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -333,3 +333,10 @@ option('native-arch-optimization',
333 value: true, 333 value: true,
334 description: 'Flag for enabling architecture native optimizations' 334 description: 'Flag for enabling architecture native optimizations'
335) 335)
336
337option('coro',
338 type : 'combo',
339 choices : ['fcontext', 'thread'],
340 value : 'fcontext',
341 description : 'Which coroutine implementation to use'
342)
diff --git a/src/lib/eina/meson.build b/src/lib/eina/meson.build
index 9535391619..2217c490c8 100644
--- a/src/lib/eina/meson.build
+++ b/src/lib/eina/meson.build
@@ -101,6 +101,7 @@ public_sub_headers = [
101'eina_freeq.h', 101'eina_freeq.h',
102'eina_slstr.h', 102'eina_slstr.h',
103'eina_vpath.h', 103'eina_vpath.h',
104'eina_coro.h',
104] 105]
105 106
106public_headers = [ 107public_headers = [
@@ -115,6 +116,7 @@ sources = [
115'eina_binbuf.c', 116'eina_binbuf.c',
116'eina_binshare.c', 117'eina_binshare.c',
117'eina_convert.c', 118'eina_convert.c',
119'eina_coro.c',
118'eina_counter.c', 120'eina_counter.c',
119'eina_cow.c', 121'eina_cow.c',
120'eina_cpu.c', 122'eina_cpu.c',
@@ -345,6 +347,15 @@ if sys_osx == true
345 347
346endif 348endif
347 349
350eina_build_libs = []
351
352if get_option('coro') == 'fcontext'
353 eina_config.set('USE_CORO_FCONTEXT', 1)
354 eina_build_libs += fcontext_lib
355else
356 eina_config.set('USE_CORO_THREAD', 1)
357endif
358
348eina_config_file = configure_file( 359eina_config_file = configure_file(
349 output: 'eina_config.h', 360 output: 'eina_config.h',
350 configuration: eina_config, 361 configuration: eina_config,
@@ -370,7 +381,8 @@ eina_lib = library('eina', sources,
370 include_directories : config_dir, 381 include_directories : config_dir,
371 dependencies: [m, rt, dl, execinfo, iconv, eina_deps, thread_dep, eina_mem_pools], 382 dependencies: [m, rt, dl, execinfo, iconv, eina_deps, thread_dep, eina_mem_pools],
372 install: true, 383 install: true,
373 version : meson.project_version() 384 version : meson.project_version(),
385 link_with : eina_build_libs
374) 386)
375 387
376 388
diff --git a/src/static_libs/fcontext/meson.build b/src/static_libs/fcontext/meson.build
new file mode 100644
index 0000000000..17f29b5dba
--- /dev/null
+++ b/src/static_libs/fcontext/meson.build
@@ -0,0 +1,12 @@
1
2fcontext_src = [
3 'make_all_gas.S',
4 'jump_all_gas.S'
5]
6
7if get_option('coro') == 'fcontext'
8 fcontext_lib = static_library('fcontext',
9 fcontext_src,
10 install: false
11 )
12endif
diff --git a/src/tests/eina/meson.build b/src/tests/eina/meson.build
index f111e3a12d..ffa9b1cac7 100644
--- a/src/tests/eina/meson.build
+++ b/src/tests/eina/meson.build
@@ -53,7 +53,8 @@ eina_test_src = files(
53'eina_test_slice.c', 53'eina_test_slice.c',
54'eina_test_freeq.c', 54'eina_test_freeq.c',
55'eina_test_slstr.c', 55'eina_test_slstr.c',
56'eina_test_vpath.c' 56'eina_test_vpath.c',
57'eina_test_coro.c'
57) 58)
58 59
59 60
diff --git a/src/tests/eo/suite/meson.build b/src/tests/eo/suite/meson.build
index 6e7f4ba6f7..6fd1b95e79 100644
--- a/src/tests/eo/suite/meson.build
+++ b/src/tests/eo/suite/meson.build
@@ -17,7 +17,8 @@ eo_suite_src = [
17 'eo_test_event.c', 17 'eo_test_event.c',
18 'eo_test_threaded_calls.c', 18 'eo_test_threaded_calls.c',
19 'eo_test_init.c', 19 'eo_test_init.c',
20 'eo_test_lifecycle.c' 20 'eo_test_lifecycle.c',
21 'eo_test_coro.c'
21] 22]
22 23
23eo_suite = executable('eo_suite', 24eo_suite = executable('eo_suite',