Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/cl-target/cl-target.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/cl-target/cl-target.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1703, Tue Mar 6 13:05:55 2012 UTC revision 1704, Tue Mar 6 15:44:37 2012 UTC
# Line 166  Line 166 
166    
167      datatype program = Prog of {      datatype program = Prog of {
168          name : string,                  (* stem of source file *)          name : string,                  (* stem of source file *)
169            exec : bool,                    (* true for standalone program *)
170          double : bool,                  (* true for double-precision support *)          double : bool,                  (* true for double-precision support *)
171          parallel : bool,                (* true for multithreaded (or multi-GPU) target *)          parallel : bool,                (* true for multithreaded (or multi-GPU) target *)
172          debug : bool,                   (* true for debug support in executable *)          debug : bool,                   (* true for debug support in executable *)
# Line 281  Line 282 
282    (* programs *)    (* programs *)
283      structure Program =      structure Program =
284        struct        struct
285          fun new {name, double, parallel, debug} = (          fun new {name, exec, double, parallel, debug} = (
286                RN.initTargetSpec double;                RN.initTargetSpec double;
287                CNames.initTargetSpec {double=double, long=false};                CNames.initTargetSpec {double=double, long=false};
288                Prog{                Prog{
289                    name = name,                    name = name,
290                      exec = exec,
291                    double = double, parallel = parallel, debug = debug,                    double = double, parallel = parallel, debug = debug,
292                    globals = ref [],                    globals = ref [],
293                    topDecls = ref [],                    topDecls = ref [],
# Line 780  Line 782 
782                end                end
783    
784        (* output the code to the filesystem.  The string is the basename of the source file *)        (* output the code to the filesystem.  The string is the basename of the source file *)
785          fun generate (basename, prog as Prog{double, parallel, debug, ...}) = let          fun generate (basename, prog as Prog{exec, double, parallel, debug, ...}) = let
786                fun condCons (true, x, xs) = x::xs                fun condCons (true, x, xs) = x::xs
787                  | condCons (false, _, xs) = xs                  | condCons (false, _, xs) = xs
788              (* generate the C compiler flags *)              (* generate the C compiler flags *)
# Line 795  Line 797 
797                val extraLibs = Paths.teemLinkFlags @  #base Paths.extraLibs :: extraLibs                val extraLibs = Paths.teemLinkFlags @  #base Paths.extraLibs :: extraLibs
798                     val extraLibs =  #cl Paths.extraLibs :: extraLibs                     val extraLibs =  #cl Paths.extraLibs :: extraLibs
799                val rtLib = TargetUtil.runtimeName {                val rtLib = TargetUtil.runtimeName {
800                        target = TargetUtil.TARGET_CL,                        exec = exec, target = TargetUtil.TARGET_CL,
801                        parallel = parallel, double = double, debug = debug                        parallel = parallel, double = double, debug = debug
802                      }                      }
803                val ldOpts = rtLib :: extraLibs                val ldOpts = rtLib :: extraLibs

Legend:
Removed from v.1703  
changed lines
  Added in v.1704

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0