Commit 20c8eb9d authored by Jurrien Stutterheim's avatar Jurrien Stutterheim

Port ProjectCompilerOptions record to MacOSX and Linux

parent 19488f39
......@@ -31,6 +31,7 @@ Global
Link
LinkMethod: Static
GenerateRelocations: False
GenerateSymbolTable: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
......@@ -1050,6 +1051,20 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Module
Name: StdDebug
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Module
Name: StdEnum
Dir: {Application}/lib/StdEnv
......
......@@ -40,6 +40,14 @@ instance == CompilerMsg
:: WindowFun env :== ([String]) -> env -> env
:: ProjectCompilerOptions = {
pco_memory_profiling :: !Bool,
pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool,
pco_dynamics :: !Bool,
pco_link_dynamic :: !Bool
}
Compile :: // Compiles the given file:
!String // compiler exe name and options
// !! should be full path so that cocl generates diagnostics in logical place...
......@@ -51,9 +59,7 @@ Compile :: // Compiles the given file:
!CompileOrCheckSyntax // check syntax only?
!Pathname // full .icl pathname of module to be compiled
!(List Pathname) // list of paths where compiler can find imported .dcl files
!Bool // project memory profiling?
!Bool // project time profiling?
!Bool // project eager or dynamic linking?
!ProjectCompilerOptions
!CompilerOptions // compiler options
!Pathname // startup directory
!CompilerProcessIds
......
......@@ -167,20 +167,19 @@ file_path startupdir base_name slot
/* Compiles the given file: */
Compile :: !String !Bool !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !Pathname !(List Pathname) !Bool !Bool !Bool
Compile :: !String !Bool !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !Pathname !(List Pathname) !ProjectCompilerOptions
!CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Pathname,!CompilerMsg,!CompilerProcessIds,!*env) | FileEnv env
Compile cocl` use_compiler_process_psn write_module_times errwin typewin compileOrCheckSyntax path paths projectMemoryProfiling
projectTimeProfiling projectEagerOrDynamic
Compile cocl` use_compiler_process_psn write_module_times errwin typewin compileOrCheckSyntax path paths project_compiler_options
co=:{CompilerOptions | listTypes} startupdir compiler_psns ps
# (cocl,name,signature) = mangleCompiler cocl` startupdir // platform dependant mangling...
# command
= cocl +++ clear_cache_option +++ write_module_times_string
+++ MakeCompilerOptionsString
compileOrCheckSyntax
projectMemoryProfiling
projectTimeProfiling
projectEagerOrDynamic
project_compiler_options.pco_memory_profiling
project_compiler_options.pco_time_profiling
project_compiler_options.pco_link_dynamic
co
+++ " -sl"
+++ " -P " +++ quoted_string (ConcatenatePath paths)
......
......@@ -23,6 +23,14 @@ import PmCallBack
:: WindowFun env :== ([String]) -> env -> env
:: ProjectCompilerOptions = {
pco_memory_profiling :: !Bool,
pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool,
pco_dynamics :: !Bool,
pco_link_dynamic :: !Bool
}
instance == CompileOrCheckSyntax
instance == CodeGenerateAsmOrCode
......@@ -38,19 +46,19 @@ CompileHandleExitCode :: !Int !String !String !Int !(WindowFun *env) !(WindowFun
InitCompilingInfo :: *CompilingInfo
Compile :: !String !Bool !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName !Pathname
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Pathname,!CompilerMsg,!CompilerProcessIds,!*env)
| FileEnv env
CompilePersistent ::
!String !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !*CompilingInfo !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !*CompilingInfo !*env
-> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg))
| FileEnv env
CompileStartCommand ::
!String !Bool !(WindowFun *env) !CompileOrCheckSyntax !Pathname
!(List Pathname) !Int !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !Int !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Bool,!CompilerProcessIds,!*env)
| FileEnv env
......
......@@ -71,12 +71,12 @@ InitCompilingInfo :: *CompilingInfo
InitCompilingInfo = NoCompiler
Compile :: !String !Bool !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName !Pathname
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Pathname,!CompilerMsg,!CompilerProcessIds,!*env)
| FileEnv env
Compile
cocl use_compiler_process_ids write_module_times errwin typewin compileOrCheckSyntax mdn path paths projectHeapProfiling
projectTimeProfiling projectEagerOrDynamic co=:{CompilerOptions | listTypes}
cocl use_compiler_process_ids write_module_times errwin typewin compileOrCheckSyntax mdn path paths project_compiler_options
co=:{CompilerOptions | listTypes}
startupdir compiler_process_ids env
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
......@@ -84,7 +84,7 @@ Compile
out_file_name = out_file_path temp_dir 0
errors_file_name = errors_file_path temp_dir 0
# cocl_arguments = compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co
# cocl_arguments = compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co
cocl_arguments = add_options_string_to_args 0 options2 cocl_arguments
cocl_arguments = add_options_string_to_args 0 options1 cocl_arguments
......@@ -116,11 +116,10 @@ Compile
CompilePersistent ::
!String !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !*CompilingInfo !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !*CompilingInfo !*env
-> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg))
| FileEnv env
CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax mdn paths projectHeapProfiling
projectTimeProfiling projectEagerOrDynamic co=:{CompilerOptions | listTypes}
CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax mdn paths project_compiler_options co=:{CompilerOptions | listTypes}
startupdir compiling_info env
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
......@@ -130,7 +129,7 @@ CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax md
out_file_name = out_file_path temp_dir 0
errors_file_name = errors_file_path temp_dir 0
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co
# args_string = concat_args args+++
" "+++mdn.mdn_name+++
" -P "+++"\""+++concatenate_paths paths+++"\""+++
......@@ -175,11 +174,11 @@ parse_result_number i result_string
CompileStartCommand ::
!String !Bool !(WindowFun *env) !CompileOrCheckSyntax !Pathname
!(List Pathname) !Int !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !Int !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Bool,!CompilerProcessIds,!*env)
| FileEnv env
CompileStartCommand cocl write_module_times errwin compileOrCheckSyntax path
paths slot projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co startupdir compiler_process_ids ps
paths slot project_compiler_options co startupdir compiler_process_ids ps
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
# ({commands_fd,results_fd},compiler_process_ids)
......@@ -189,7 +188,7 @@ CompileStartCommand cocl write_module_times errwin compileOrCheckSyntax path
out_file_name = out_file_path temp_dir slot
errors_file_name = errors_file_path temp_dir slot
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co
# args_string = concat_args args+++
" "+++path+++
" -P "+++concatenate_paths paths+++
......
......@@ -24,6 +24,14 @@ import PmCallBack
:: WindowFun env :== ([String]) -> env -> env
:: ProjectCompilerOptions = {
pco_memory_profiling :: !Bool,
pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool,
pco_dynamics :: !Bool,
pco_link_dynamic :: !Bool
}
instance == CompileOrCheckSyntax
instance == CodeGenerateAsmOrCode
......@@ -39,7 +47,7 @@ CompileHandleExitCode :: !Int !String !String !Int !(WindowFun *env) !(WindowFun
InitCompilingInfo :: *CompilingInfo
Compile :: !String !Bool !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName !Pathname
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Pathname,!CompilerMsg,!CompilerProcessIds,!*env)
| FileEnv env
......
......@@ -71,12 +71,12 @@ InitCompilingInfo :: *CompilingInfo
InitCompilingInfo = NoCompiler
Compile :: !String !Bool !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName !Pathname
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Pathname,!CompilerMsg,!CompilerProcessIds,!*env)
| FileEnv env
Compile
cocl use_compiler_process_ids write_module_times errwin typewin compileOrCheckSyntax mdn path paths projectHeapProfiling
projectTimeProfiling projectEagerOrDynamic co=:{CompilerOptions | listTypes}
cocl use_compiler_process_ids write_module_times errwin typewin compileOrCheckSyntax mdn path paths project_compiler_options
co=:{CompilerOptions | listTypes}
startupdir compiler_process_ids env
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
......@@ -84,7 +84,7 @@ Compile
out_file_name = out_file_path temp_dir 0
errors_file_name = errors_file_path temp_dir 0
# cocl_arguments = compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co
# cocl_arguments = compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co
cocl_arguments = add_options_string_to_args 0 options2 cocl_arguments
cocl_arguments = add_options_string_to_args 0 options1 cocl_arguments
......@@ -116,11 +116,11 @@ Compile
CompilePersistent ::
!String !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName
!(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !*CompilingInfo !*env
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !*CompilingInfo !*env
-> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg))
| FileEnv env
CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax mdn paths projectHeapProfiling
projectTimeProfiling projectEagerOrDynamic co=:{CompilerOptions | listTypes}
CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax mdn paths project_compiler_options
co=:{CompilerOptions | listTypes}
startupdir compiling_info env
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
......@@ -130,7 +130,7 @@ CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax md
out_file_name = out_file_path temp_dir 0
errors_file_name = errors_file_path temp_dir 0
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co
# args_string = concat_args args+++
" "+++mdn.mdn_name+++
" -P "+++"\""+++concatenate_paths paths+++"\""+++
......@@ -175,11 +175,11 @@ parse_result_number i result_string
CompileStartCommand ::
!String !Bool !(WindowFun *env) !CompileOrCheckSyntax !Pathname
!(List Pathname) !Int !Bool !Bool !Bool !CompilerOptions !Pathname !CompilerProcessIds !*env
!(List Pathname) !Int !ProjectCompilerOptions !CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Bool,!CompilerProcessIds,!*env)
| FileEnv env
CompileStartCommand cocl write_module_times errwin compileOrCheckSyntax path
paths slot projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co startupdir compiler_process_ids ps
paths slot project_compiler_options co startupdir compiler_process_ids ps
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
# ({commands_fd,results_fd},compiler_process_ids)
......@@ -189,7 +189,7 @@ CompileStartCommand cocl write_module_times errwin compileOrCheckSyntax path
out_file_name = out_file_path temp_dir slot
errors_file_name = errors_file_path temp_dir slot
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co
# args_string = concat_args args+++
" "+++path+++
" -P "+++concatenate_paths paths+++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment