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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/target-cpu/gen.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/target-cpu/gen.sml

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

revision 4416, Tue Aug 16 21:59:50 2016 UTC revision 4417, Wed Aug 17 12:22:45 2016 UTC
# Line 152  Line 152 
152      fun compile (spec : TargetSpec.t, basename) = let      fun compile (spec : TargetSpec.t, basename) = let
153          (* generate the C compiler flags *)          (* generate the C compiler flags *)
154            val cflags = ["-I" ^ Paths.diderotInclude(), "-I" ^ Paths.teemInclude()]            val cflags = ["-I" ^ Paths.diderotInclude(), "-I" ^ Paths.teemInclude()]
155            val cflags = condCons (TargetSpec.isParallel spec, #pthread Paths.cxxflags, cflags)            val cflags = condCons (TargetSpec.isParallel spec, #parallel Paths.cxxFlags, cflags)
156            val cflags = if #debug spec            val cflags = if #debug spec
157                  then #debug Paths.cxxflags :: cflags                  then #debug Paths.cxxFlags :: cflags
158                  else #ndebug Paths.cxxflags :: cflags                  else #ndebug Paths.cxxFlags :: cflags
159            val cflags = #base Paths.cxxflags :: cflags            val cflags = #base Paths.cxxFlags :: cflags
160            in            in
161              RunCC.compile (basename, cflags)              RunCC.compile (basename, cflags)
162            end            end
163    
164      fun ldFlags (spec : TargetSpec.t) = if #exec spec      fun ldFlags (spec : TargetSpec.t) = if #exec spec
165            then let            then let
166              val extraLibs = condCons (TargetSpec.isParallel spec, #pthread Paths.extraLibs, [])              val extraLibs = condCons (TargetSpec.isParallel spec, #parallel Paths.extraLibs, [])
167              val extraLibs = Paths.teemLinkFlags() @ #base Paths.extraLibs :: extraLibs              val extraLibs = Paths.teemLinkFlags() @ #base Paths.extraLibs :: extraLibs
168              val rtLib = TargetSpec.runtimeLibName spec              val rtLib = TargetSpec.runtimeLibName spec
169              in              in
170                condCons (TargetSpec.isParallel spec, #pthread Paths.cxxflags, rtLib :: extraLibs)                condCons (TargetSpec.isParallel spec, #parallel Paths.cxxFlags, rtLib :: extraLibs)
171              end              end
172            else [TargetSpec.runtimeLibName spec]            else [TargetSpec.runtimeLibName spec]
173    

Legend:
Removed from v.4416  
changed lines
  Added in v.4417

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