Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add option to test native elaboration to run_regr.rb

  • Loading branch information...
commit 916083c4d526d93069589c154a276dab6eeb1a6c 1 parent f5813f0
@nickg authored
Showing with 9 additions and 8 deletions.
  1. +2 −1  src/link.c
  2. +7 −7 test/run_regr.rb
View
3  src/link.c
@@ -151,9 +151,10 @@ static void link_shared(tree_t top)
link_arg_f("%s", SYSTEM_CC);
link_arg_f("-shared");
link_arg_f("-o");
- // TODO: different on OS X, etc.
#if defined __CYGWIN__
link_output(top, "dll");
+#elif defined __APPLE__
+ link_output(top, "dylib");
#else
link_output(top, "so");
#endif
View
14 test/run_regr.rb
@@ -9,7 +9,7 @@
TestDir = Pathname.new(__FILE__).realpath.dirname
BuildDir = Pathname.new(ENV['BUILD_DIR'] || Dir.pwd).realpath
LibPath = "#{BuildDir}/lib/std:#{BuildDir}/lib/ieee"
-Opts = Getopt::Std.getopts('v')
+Opts = Getopt::Std.getopts('vn')
def read_tests
tests = []
@@ -24,11 +24,11 @@ def read_tests
end
def valgrind
- if Opts['v'] then
- 'valgrind '
- else
- ''
- end
+ Opts['v'] ? 'valgrind ' : ''
+end
+
+def native
+ Opts['n'] ? '--native' : ''
end
def nvc
@@ -58,7 +58,7 @@ def analyse(t)
end
def elaborate(t)
- run_cmd "#{nvc} -e #{t[:name]} --disable-opt"
+ run_cmd "#{nvc} -e #{t[:name]} --disable-opt #{native}"
end
def run(t)
Please sign in to comment.
Something went wrong with that request. Please try again.