From bedd9ccaa1aaac82f4d8c48754ea79798dd4a8df Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Thu, 20 Jun 2019 17:28:22 -0400 Subject: [PATCH] Verify working meson build on windows. Using MSVC, no need for GNU tools. --- build_win.bat | 4 ++-- meson.build | 10 +++++----- meson_options.txt | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build_win.bat b/build_win.bat index e0da8c51..be3170d3 100644 --- a/build_win.bat +++ b/build_win.bat @@ -16,7 +16,7 @@ @rem Set compile and link options here @setlocal -@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS +@set JANET_COMPILE=cl /nologo /Isrc\include /Isrc\conf /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS @set JANET_LINK=link /nologo mkdir build @@ -132,7 +132,7 @@ copy README.md dist\README.md copy janet.lib dist\janet.lib copy janet.exp dist\janet.exp copy src\include\janet.h dist\janet.h -copy src\include\janetconf.h dist\janetconf.h +copy src\conf\janetconf.h dist\janetconf.h copy auxlib\cook.janet dist\cook.janet diff --git a/meson.build b/meson.build index 100aaafa..f5508723 100644 --- a/meson.build +++ b/meson.build @@ -19,9 +19,7 @@ # IN THE SOFTWARE. project('janet', 'c', - default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both', - 'strip=true', 'optimization=2', 'werror=true', - 'debug=false'], + default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'], version : '1.0.0-dev') # Global settings @@ -34,7 +32,9 @@ m_dep = cc.find_library('m', required : false) dl_dep = cc.find_library('dl', required : false) # Link options -add_project_link_arguments('-rdynamic', language : 'c') +if build_machine.system() != 'windows' + add_project_link_arguments('-rdynamic', language : 'c') +endif # Generate custom janetconf.h conf = configuration_data() @@ -50,7 +50,7 @@ conf.set('JANET_VERSION_MINOR', version_parts[1].to_int()) conf.set('JANET_VERSION_PATCH', last_parts[0].to_int()) conf.set_quoted('JANET_VERSION', meson.project_version()) # Use options -conf.set_quoted('JANET_BUILD', get_option('build_hash')) +conf.set_quoted('JANET_BUILD', get_option('git_hash')) conf.set('JANET_NO_NANBOX', not get_option('nanbox')) conf.set('JANET_SINGLE_THREADED', not get_option('single_threaded')) conf.set('JANET_NO_DYNAMIC_MODULES', not get_option('dynamic_modules')) diff --git a/meson_options.txt b/meson_options.txt index 615d80b0..3388cd9e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ -option('build_hash', type : 'string', value : 'meson') +option('git_hash', type : 'string', value : 'meson') option('single_threaded', type : 'boolean', value : false) option('nanbox', type : 'boolean', value : true)