- redef meth process_options
- do
- super
- output_file = opt_output.value
- boost = opt_boost.value
- no_cc = opt_no_cc.value
- ext_prefix = opt_extension_prefix.value
- if ext_prefix == null then ext_prefix = ""
- attr_sim = opt_attr_sim.value
- global = opt_global.value
- base_dir = ".nit_compile"
- clibdir = opt_clibdir.value
- if clibdir == null then
- var dir = once ("NIT_DIR".to_symbol).environ
- if dir.is_empty then
- var dir = "{sys.program_name.dirname}/../lib"
- if dir.file_exists then clibdir = dir
- else
- dir = "{dir}/lib"
- if dir.file_exists then clibdir = dir
- end
- if clibdir == null then
- error("Error: Cannot locate NIT C library directory. Uses --clibdir or envvar NIT_DIR.")
- exit(1)
- end
- end
- bindir = opt_bindir.value
- if bindir == null then
- var dir = once ("NIT_DIR".to_symbol).environ
- if dir.is_empty then
- var dir = "{sys.program_name.dirname}/../bin"
- if dir.file_exists then bindir = dir
- else
- dir = "{dir}/bin"
- if dir.file_exists then bindir = dir
- end
- if bindir == null then
- error("Error: Cannot locate NIT tools directory. Uses --bindir or envvar NIT_DIR.")
- exit(1)
- end
+ var sum = opt_global.value.to_i + opt_separate.value.to_i + opt_erasure.value.to_i
+ if sum > 1 then
+ print "Options --global, --separate and --erasure are exclusive"
+ exit(1)
+ else if sum == 0 then
+ # --separate by default
+ opt_separate.value = true