Changes in / [e4d3ceb:4e06c1e]
- Files:
-
- 1 deleted
- 7 edited
-
Jenkins/FullBuild (deleted)
-
Jenkinsfile (modified) (7 diffs)
-
src/InitTweak/GenInit.cc (modified) (1 diff)
-
src/InitTweak/InitTweak.cc (modified) (1 diff)
-
src/ResolvExpr/Resolver.cc (modified) (2 diffs)
-
src/SymTab/Autogen.cc (modified) (2 diffs)
-
src/SymTab/Autogen.h (modified) (1 diff)
-
src/tests/.expect/extension.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
re4d3ceb r4e06c1e 2 2 3 3 //=========================================================================================================== 4 // Main compilation routine s4 // Main compilation routine 5 5 //=========================================================================================================== 6 6 //Compilation script is done here but environnement set-up and error handling is done in main loop 7 def cfa_build(boolean full_build , String flags) {7 def cfa_build(boolean full_build) { 8 8 build_stage 'Checkout' 9 9 def install_dir = pwd tmp: true … … 23 23 //escapes the sandbox 24 24 //Also specify the compiler by hand 25 sh "./configure CXX=${currentCC.cpp_cc} CXXFLAGS=${flags} CFAFLAGS=${flags}--with-backend-compiler=${currentCC.cfa_backend_cc} --prefix=${install_dir} --enable-silent-rules --quiet"25 sh "./configure CXX=${currentCC.cpp_cc} --with-backend-compiler=${currentCC.cfa_backend_cc} --prefix=${install_dir} --enable-silent-rules --quiet" 26 26 27 27 //Compile the project … … 83 83 } 84 84 85 def push_build() { 86 //Don't use the build_stage function which outputs the compiler 87 stage 'Push' 88 89 status_prefix = 'Push' 90 91 def out_dir = pwd tmp: true 92 sh "mkdir -p ${out_dir}" 93 94 //parse git logs to find what changed 95 sh "git remote > ${out_dir}/GIT_REMOTE" 96 git_remote = readFile("${out_dir}/GIT_REMOTE") 97 remoteDoLangExists = git_remote.contains("DoLang") 98 99 if( !remoteDoLangExists ) { 100 sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git' 101 } 102 103 sh "git push DoLang ${gitRefNewValue}:master" 104 } 105 85 106 //=========================================================================================================== 86 107 // Helper classes/variables/routines to make the status and stage name easier to use … … 134 155 node ('master'){ 135 156 136 boolean bIsFullBuild157 boolean doPromoteBuild2DoLang 137 158 def err = null 138 159 def log_needed = false … … 155 176 defaultValue: false, \ 156 177 description: 'If true, the build will be promoted to the do-lang git repository (on successful builds only)', \ 157 name: 'isFullBuild' \ 158 ], \ 159 [$class: 'ChoiceParameterDefinition', \ 160 choices: '64-bit\n32-bit', \ 161 defaultValue: '64-bit', \ 162 description: 'The architecture to use for compilation', \ 163 name: 'buildArchitecture' \ 164 ]] \ 178 name: 'promoteBuild2DoLang' \ 179 ]] \ 165 180 ]]) 166 181 167 bIsFullBuild = isFullBuild == 'true' 168 architectureFlag = buildArchitecture == '64-bit' ? '-m64' : (buildArchitecture == '32-bit' ? '-m32' : 'ERROR') 169 170 echo "FULL BUILD = ${isFullBuild}\nArchitecture = ${buildArchitecture} (flag ${architectureFlag})" 182 doPromoteBuild2DoLang = promoteBuild2DoLang == 'true' 183 184 echo "FULL BUILD = ${doPromoteBuild2DoLang}" 171 185 172 186 //Compile using gcc-4.9 173 187 currentCC = new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9') 174 cfa_build( bIsFullBuild, architectureFlag)188 cfa_build(doPromoteBuild2DoLang) 175 189 176 190 //Compile latex documentation 177 191 doc_build() 178 192 179 if( bIsFullBuild) {193 if( doPromoteBuild2DoLang ) { 180 194 //Compile using gcc-5 181 195 currentCC = new CC_Desc('gcc-5', 'g++-5', 'gcc-5') 182 cfa_build(true , architectureFlag)196 cfa_build(true) 183 197 184 198 //Compile using gcc-4.9 185 199 currentCC = new CC_Desc('gcc-6', 'g++-6', 'gcc-6') 186 cfa_build(true, architectureFlag) 200 cfa_build(true) 201 202 //Push latest changes to do-lang repo 203 push_build() 187 204 } 188 205 } … … 204 221 205 222 finally { 206 echo 'Build Completed' 207 208 //Send email with final results if this is not a full build 209 if( !bIsFullBuild ) { 210 echo 'Notifying users of result' 211 email(currentBuild.result, log_needed) 212 } 223 //Send email with final results 224 notify_result(doPromoteBuild2DoLang, err, currentBuild.result, log_needed) 213 225 214 226 /* Must re-throw exception to propagate error */ … … 222 234 //Routine responsible of sending the email notification once the build is completed 223 235 //=========================================================================================================== 236 def notify_result(boolean promote, Exception err, String status, boolean log) { 237 echo 'Build completed, sending result notification' 238 if(promote) { 239 if( err ) { 240 promote_email(status) 241 } 242 } 243 else { 244 email(status, log) 245 } 246 } 247 248 //Email notification on a full build failure 249 def promote_email(String status) { 250 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 251 //Configurations for email format 252 def email_subject = "[cforall git][PROMOTE - FAILURE]" 253 def email_body = """This is an automated email from the Jenkins build machine. It was 254 generated because of a git hooks/post-receive script following 255 a ref change was pushed to the repository containing 256 the project "UNNAMED PROJECT". 257 258 Check console output at ${env.BUILD_URL} to view the results. 259 260 - Status -------------------------------------------------------------- 261 262 PROMOTE FAILURE - ${status} 263 """ 264 265 def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com" 266 267 //send email notification 268 emailext body: email_body, subject: email_subject, to: email_to, attachLog: true 269 } 270 224 271 //Standard build email notification 225 272 def email(String status, boolean log) { -
src/InitTweak/GenInit.cc
re4d3ceb r4e06c1e 162 162 // but it seems reasonable at the moment for this to be done by makeArrayFunction 163 163 // itself 164 assert( ctor.size() == 1 && dynamic_cast< ImplicitCtorDtorStmt * >( ctor.front() ));165 assert( dtor.size() == 1 && dynamic_cast< ImplicitCtorDtorStmt * >( dtor.front() ));166 objDecl->set_init( new ConstructorInit( ctor.front(), dtor.front(), objDecl->get_init() ) );164 assert( ctor.size() == 1 ); 165 assert( dtor.size() == 1 ); 166 objDecl->set_init( new ConstructorInit( new ImplicitCtorDtorStmt( ctor.front() ), new ImplicitCtorDtorStmt( dtor.front() ), objDecl->get_init() ) ); 167 167 } else { 168 168 // array came with an initializer list: initialize each element -
src/InitTweak/InitTweak.cc
re4d3ceb r4e06c1e 66 66 } else if ( CompoundStmt * compoundStmt = dynamic_cast< CompoundStmt * >( stmt ) ) { 67 67 // could also be a compound statement with a loop, in the case of an array 68 if( compoundStmt->get_kids().size() == 2 ) { 69 // loop variable and loop 70 ForStmt * forStmt = dynamic_cast< ForStmt * >( compoundStmt->get_kids().back() ); 71 assert( forStmt && forStmt->get_body() ); 72 return getCtorDtorCall( forStmt->get_body() ); 73 } else if ( compoundStmt->get_kids().size() == 1 ) { 74 // should be the call statement, but in any case there's only one option 75 return getCtorDtorCall( compoundStmt->get_kids().front() ); 76 } else { 77 assert( false && "too many statements in compoundStmt for getCtorDtorCall" ); 78 } 68 assert( compoundStmt->get_kids().size() == 2 ); // loop variable and loop 69 ForStmt * forStmt = dynamic_cast< ForStmt * >( compoundStmt->get_kids().back() ); 70 assert( forStmt && forStmt->get_body() ); 71 return getCtorDtorCall( forStmt->get_body() ); 79 72 } if ( ImplicitCtorDtorStmt * impCtorDtorStmt = dynamic_cast< ImplicitCtorDtorStmt * > ( stmt ) ) { 80 73 return getCtorDtorCall( impCtorDtorStmt->get_callStmt() ); -
src/ResolvExpr/Resolver.cc
re4d3ceb r4e06c1e 545 545 // get Variable <array>, then get the base type of the VariableExpr - this is the type that needs to be fixed 546 546 Expression * arr = InitTweak::getCallArg( plusExpr, 0 ); 547 assert( dynamic_cast< VariableExpr * >( arr ) || dynamic_cast< MemberExpr *>( arr ));547 assert( dynamic_cast< VariableExpr * >( arr ) ); 548 548 assert( arr && arr->get_results().size() == 1 ); 549 549 type = arr->get_results().front()->clone(); … … 554 554 assert( constructee->get_results().size() == 1 ); 555 555 AddressExpr * addrExpr = dynamic_cast< AddressExpr * > ( constructee ); 556 assert( addrExpr && addrExpr->get_results().size() == 1 );556 assert( addrExpr && addrExpr->get_results().size() == 1); 557 557 type = addrExpr->get_results().front()->clone(); 558 558 } -
src/SymTab/Autogen.cc
re4d3ceb r4e06c1e 82 82 } 83 83 84 Statement * callStmt = new ExprStmt( noLabels, fExpr ); 85 if ( (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) ) ) { 86 // implicitly generated ctor/dtor calls should be wrapped 87 // so that later passes are aware they were generated. 88 // xxx - don't mark as an implicit ctor/dtor if obj is a bitfield, 89 // because this causes the address to be taken at codegen, which is illegal in C. 90 callStmt = new ImplicitCtorDtorStmt( callStmt ); 91 } 92 *out++ = callStmt; 84 *out++ = new ExprStmt( noLabels, fExpr ); 93 85 } 94 86 … … 250 242 } 251 243 252 if ( type->get_qualifiers().isConst && func->get_name() == "?=?") {253 // don't assign const members , but do construct/destruct244 if ( type->get_qualifiers().isConst ) { 245 // don't assign const members 254 246 continue; 255 247 } -
src/SymTab/Autogen.h
re4d3ceb r4e06c1e 91 91 block->get_kids().push_back( new DeclStmt( noLabels, index ) ); 92 92 block->get_kids().push_back( new ForStmt( noLabels, initList, cond, inc, new ExprStmt( noLabels, fExpr ) ) ); 93 94 Statement * stmt = block; 95 if ( fname == "?{}" || fname == "^?{}" ) { 96 // implicitly generated ctor/dtor calls should be wrapped 97 // so that later passes are aware they were generated 98 stmt = new ImplicitCtorDtorStmt( stmt ); 99 } 100 *out++ = stmt; 93 *out++ = block; 101 94 } 102 95 } // namespace SymTab -
src/tests/.expect/extension.txt
re4d3ceb r4e06c1e 20 20 } 21 21 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){ 22 ((void)((* ((int *)(&(*___dst__P2sS_1).__a__i_1)))) /* ?{} */);23 ((void)((* ((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ?{} */);24 ((void)((* ((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);22 ((void)((*___dst__P2sS_1).__a__i_1) /* ?{} */); 23 ((void)((*___dst__P2sS_1).__b__i_1) /* ?{} */); 24 ((void)((*___dst__P2sS_1).__c__i_1) /* ?{} */); 25 25 } 26 26 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){ 27 ((void)((* ((int *)(&(*___dst__P2sS_1).__a__i_1)))=___src__2sS_1.__a__i_1) /* ?{} */);28 ((void)((* ((int *)(&(*___dst__P2sS_1).__b__i_1)))=___src__2sS_1.__b__i_1) /* ?{} */);29 ((void)((* ((int *)(&(*___dst__P2sS_1).__c__i_1)))=___src__2sS_1.__c__i_1) /* ?{} */);27 ((void)((*___dst__P2sS_1).__a__i_1=___src__2sS_1.__a__i_1) /* ?{} */); 28 ((void)((*___dst__P2sS_1).__b__i_1=___src__2sS_1.__b__i_1) /* ?{} */); 29 ((void)((*___dst__P2sS_1).__c__i_1=___src__2sS_1.__c__i_1) /* ?{} */); 30 30 } 31 31 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){ 32 ((void)((* ((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ^?{} */);33 ((void)((* ((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ^?{} */);34 ((void)((* ((int *)(&(*___dst__P2sS_1).__a__i_1)))) /* ^?{} */);32 ((void)((*___dst__P2sS_1).__c__i_1) /* ^?{} */); 33 ((void)((*___dst__P2sS_1).__b__i_1) /* ^?{} */); 34 ((void)((*___dst__P2sS_1).__a__i_1) /* ^?{} */); 35 35 } 36 36 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __a__i_1){ 37 ((void)((* ((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);38 ((void)((* ((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ?{} */);39 ((void)((* ((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);37 ((void)((*___dst__P2sS_1).__a__i_1=__a__i_1) /* ?{} */); 38 ((void)((*___dst__P2sS_1).__b__i_1) /* ?{} */); 39 ((void)((*___dst__P2sS_1).__c__i_1) /* ?{} */); 40 40 } 41 41 static inline void ___constructor__F_P2sSii_autogen___1(struct S *___dst__P2sS_1, int __a__i_1, int __b__i_1){ 42 ((void)((* ((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);43 ((void)((* ((int *)(&(*___dst__P2sS_1).__b__i_1)))=__b__i_1) /* ?{} */);44 ((void)((* ((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);42 ((void)((*___dst__P2sS_1).__a__i_1=__a__i_1) /* ?{} */); 43 ((void)((*___dst__P2sS_1).__b__i_1=__b__i_1) /* ?{} */); 44 ((void)((*___dst__P2sS_1).__c__i_1) /* ?{} */); 45 45 } 46 46 static inline void ___constructor__F_P2sSiii_autogen___1(struct S *___dst__P2sS_1, int __a__i_1, int __b__i_1, int __c__i_1){ 47 ((void)((* ((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);48 ((void)((* ((int *)(&(*___dst__P2sS_1).__b__i_1)))=__b__i_1) /* ?{} */);49 ((void)((* ((int *)(&(*___dst__P2sS_1).__c__i_1)))=__c__i_1) /* ?{} */);47 ((void)((*___dst__P2sS_1).__a__i_1=__a__i_1) /* ?{} */); 48 ((void)((*___dst__P2sS_1).__b__i_1=__b__i_1) /* ?{} */); 49 ((void)((*___dst__P2sS_1).__c__i_1=__c__i_1) /* ?{} */); 50 50 } 51 51 __extension__ union U {
Note:
See TracChangeset
for help on using the changeset viewer.