#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Wed, 31 Aug 2016 19:58:31 +0200
changeset 16820 8bf34bf7eaf5
parent 16819 997264b26e8f
child 16821 9af9ad633a9a
#UI_ENHANCEMENT by cg class: AbstractSettingsApplication
AbstractSettingsApplication.st
--- a/AbstractSettingsApplication.st	Wed Aug 31 19:08:46 2016 +0200
+++ b/AbstractSettingsApplication.st	Wed Aug 31 19:58:31 2016 +0200
@@ -14395,6 +14395,36 @@
     self supportedCCompilerSelection value:0
 !
 
+setupForCLANG
+    |ccOptions linkArgs linkSharedArgs|
+    
+    self cc value:'clang'.
+    ExternalAddress pointerSize == 4 ifTrue:[
+        ccOptions := '-O3 -arch x86'.
+        linkArgs := '-arch x86'.
+        linkSharedArgs := '-shared -arch x86'.
+    ] ifFalse:[
+        ccOptions := '-O3 -arch x86_64'.
+        linkArgs := '-arch x86_64'.
+        linkSharedArgs := '-shared -arch x86_64'.
+    ].
+    OperatingSystem isOSXlike ifTrue:[
+        ccOptions := ccOptions , ' -mmacosx-version-min=10.3'. 
+        linkSharedArgs := linkSharedArgs , ' -mmacosx-version-min=10.3 librun.so' 
+    ].
+    
+    self ccOptions value:ccOptions.
+    self linkArgs value:linkArgs.
+    self linkSharedArgs value:linkSharedArgs.
+    self stcIncludes value:'-I../../include -I/usr/include/freetype2'.
+    self linkCommand value:'clang'.
+    self stcLibraries value:''.
+    self makeCommand value:'make'.
+
+    self updateModifiedChannel.
+    self supportedCCompilerSelection value:0
+!
+
 setupForGCC
     self cc value:'gcc'.
     ExternalAddress pointerSize == 4 ifTrue:[
@@ -14472,6 +14502,10 @@
 
     spec := self supportedCCompilerListSpec at:idx ifAbsent:[^ self].
     compiler := spec second.
+    compiler == #clang ifTrue:[
+        self setupForCLANG.
+        ^ self.
+    ].
     compiler == #gcc ifTrue:[
         self setupForGCC.
         ^ self.
@@ -14657,6 +14691,7 @@
 
     ^ #(
         ('GNU gcc'                      #gcc)
+        ('clang'                        #clang)
      ).
 !