Changeset 4b82db3


Ignore:
Timestamp:
Aug 17, 2018, 1:58:14 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
3ad40e2
Parents:
8f466d4
Message:

Groovy and Java interaction is weird

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r8f466d4 r4b82db3  
    9898        public final String DescLong
    9999        public final String DescShort
     100
     101
     102        //Description of a compiler (Must be serializable since pipelines are persistent)
     103        private class CC_Desc implements Serializable {
     104                public String cc_name
     105                public String cpp_cc
     106                public String cfa_cc
     107
     108                CC_Desc(String cc_name, String cpp_cc, String cfa_cc) {
     109                        this.cc_name = cc_name
     110                        this.cpp_cc = cpp_cc
     111                        this.cfa_cc = cfa_cc
     112                }
     113        }
     114
     115        private static CC_Desc compiler_from_params(String cc) {
     116                switch( cc ) {
     117                        case 'gcc-6':
     118                                return new CC_Desc('gcc-6', 'g++-6', 'gcc-6')
     119                        break
     120                        case 'gcc-5':
     121                                return new CC_Desc('gcc-5', 'g++-5', 'gcc-5')
     122                        break
     123                        case 'gcc-4.9':
     124                                return new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
     125                        break
     126                        case 'clang':
     127                                return new CC_Desc('clang', 'clang++', 'gcc-6')
     128                        break
     129                        default :
     130                                error "Unhandled compiler : ${cc}"
     131                }
     132        }
     133
     134        //Description of an architecture (Must be serializable since pipelines are persistent)
     135        private class Arch_Desc implements Serializable {
     136                public String name
     137                public String flags
     138
     139                Arch_Desc(String name, String flags) {
     140                        this.name  = name
     141                        this.flags = flags
     142                }
     143        }
     144
     145        private static Arch_Desc architecture_from_params( String arch ) {
     146                switch( arch ) {
     147                        case 'x64':
     148                                return new Arch_Desc('x64', '--host=x86_64')
     149                        break
     150                        case 'x86':
     151                                return new Arch_Desc('x86', '--host=i386')
     152                        break
     153                        default :
     154                                error "Unhandled architecture : ${arch}"
     155                }
     156        }
    100157
    101158        BuildSettings(java.util.Collections$UnmodifiableMap param, java.util.TreeMap scmVars) {
     
    209266}
    210267
    211 //Description of a compiler (Must be serializable since pipelines are persistent)
    212 class CC_Desc implements Serializable {
    213         public String cc_name
    214         public String cpp_cc
    215         public String cfa_cc
    216 
    217         CC_Desc(String cc_name, String cpp_cc, String cfa_cc) {
    218                 this.cc_name = cc_name
    219                 this.cpp_cc = cpp_cc
    220                 this.cfa_cc = cfa_cc
    221         }
    222 }
    223 
    224 def compiler_from_params(cc) {
    225         switch( cc ) {
    226                 case 'gcc-6':
    227                         return new CC_Desc('gcc-6', 'g++-6', 'gcc-6')
    228                 break
    229                 case 'gcc-5':
    230                         return new CC_Desc('gcc-5', 'g++-5', 'gcc-5')
    231                 break
    232                 case 'gcc-4.9':
    233                         return new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
    234                 break
    235                 case 'clang':
    236                         return new CC_Desc('clang', 'clang++', 'gcc-6')
    237                 break
    238                 default :
    239                         error "Unhandled compiler : ${cc}"
    240         }
    241 }
    242 
    243 //Description of an architecture (Must be serializable since pipelines are persistent)
    244 class Arch_Desc implements Serializable {
    245         public String name
    246         public String flags
    247 
    248         Arch_Desc(String name, String flags) {
    249                 this.name  = name
    250                 this.flags = flags
    251         }
    252 }
    253 
    254 def architecture_from_params( arch ) {
    255         switch( arch ) {
    256                 case 'x64':
    257                         return new Arch_Desc('x64', '--host=x86_64')
    258                 break
    259                 case 'x86':
    260                         return new Arch_Desc('x86', '--host=i386')
    261                 break
    262                 default :
    263                         error "Unhandled architecture : ${arch}"
    264         }
    265 }
    266 
    267268//===========================================================================================================
    268269// Main compilation routines
Note: See TracChangeset for help on using the changeset viewer.