@@ -34,10 +34,10 @@ import * as mathjs from 'mathjs';
3434import { AbstractProject , VirtualSource } from "./EIDEProject" ;
3535import { ResManager } from "./ResManager" ;
3636import { File } from "../lib/node-utility/File" ;
37- import { ProjectConfigData , ProjectConfiguration } from "./EIDETypeDefine" ;
37+ import { BuilderOptions , ProjectConfigData , ProjectConfiguration } from "./EIDETypeDefine" ;
3838import {
3939 ArmBaseCompileData ,
40- Memory , ARMStorageLayout , ICompileOptions ,
40+ Memory , ARMStorageLayout ,
4141 FloatingHardwareOption , C51BaseCompileData , RiscvCompileData , AnyGccCompileData , MipsCompileData
4242} from './EIDEProjectModules' ;
4343import { SettingManager } from "./SettingManager" ;
@@ -87,7 +87,7 @@ export interface BuilderParams {
8787 incDirs : string [ ] ;
8888 libDirs : string [ ] ;
8989 defines : string [ ] ;
90- options : ICompileOptions ;
90+ options : BuilderOptions ;
9191 sha ?: { [ options_name : string ] : string } ;
9292 env ?: { [ name : string ] : any } ;
9393}
@@ -378,8 +378,7 @@ export abstract class CodeBuilder {
378378
379379 const outDir = File . ToUnixPath ( this . project . getOutputDir ( ) ) ;
380380 const paramsPath = this . project . ToAbsolutePath ( outDir + File . sep + this . paramsFileName ) ;
381- const compileOptions : ICompileOptions = this . project . GetConfiguration ( )
382- . compileConfigModel . getOptions ( this . project . getEideDir ( ) . path , config ) ;
381+ const compileOptions : BuilderOptions = this . project . GetConfiguration ( ) . compileConfigModel . getOptions ( ) ;
383382 const memMaxSize = this . getMcuMemorySize ( ) ;
384383 const oldParamsPath = `${ paramsPath } .old` ;
385384 const prevParams : BuilderParams | undefined = File . IsFile ( oldParamsPath ) ? JSON . parse ( fs . readFileSync ( oldParamsPath , 'utf8' ) ) : undefined ;
@@ -497,7 +496,7 @@ export abstract class CodeBuilder {
497496 builderOptions . options . afterBuildTasks = [ command ] . concat ( builderOptions . options . afterBuildTasks ) ;
498497 } catch ( error ) {
499498 GlobalEvent . emit ( 'msg' , newMessage ( 'Warning' , `Generating '${ mkfile_path } ' failed !` ) ) ;
500- GlobalEvent . emit ( 'globalLog' , ExceptionToMessage ( error , 'Error' ) ) ;
499+ GlobalEvent . log_error ( error ) ;
501500 }
502501 }
503502
@@ -569,7 +568,7 @@ export abstract class CodeBuilder {
569568
570569 protected abstract getMcuMemorySize ( ) : MemorySize | undefined ;
571570
572- protected abstract preHandleOptions ( options : ICompileOptions ) : void ;
571+ protected abstract preHandleOptions ( options : BuilderOptions ) : void ;
573572
574573 static NewBuilder ( _project : AbstractProject ) : CodeBuilder {
575574 switch ( _project . GetConfiguration ( ) . config . type ) {
@@ -911,7 +910,7 @@ export class ARMCodeBuilder extends CodeBuilder {
911910 return undefined ;
912911 }
913912
914- protected preHandleOptions ( options : ICompileOptions ) {
913+ protected preHandleOptions ( options : BuilderOptions ) {
915914
916915 const config = this . project . GetConfiguration < ArmBaseCompileData > ( ) . config ;
917916 const toolchain = this . project . getToolchain ( ) ;
@@ -1046,7 +1045,7 @@ class RiscvCodeBuilder extends CodeBuilder {
10461045 return undefined ;
10471046 }
10481047
1049- protected preHandleOptions ( options : ICompileOptions ) {
1048+ protected preHandleOptions ( options : BuilderOptions ) {
10501049
10511050 const config = this . project . GetConfiguration < RiscvCompileData > ( ) . config ;
10521051
@@ -1072,7 +1071,7 @@ class MipsCodeBuilder extends CodeBuilder {
10721071 return undefined ;
10731072 }
10741073
1075- protected preHandleOptions ( options : ICompileOptions ) {
1074+ protected preHandleOptions ( options : BuilderOptions ) {
10761075
10771076 const config = this . project . GetConfiguration < MipsCompileData > ( ) . config ;
10781077
@@ -1098,7 +1097,7 @@ class AnyGccCodeBuilder extends CodeBuilder {
10981097 return undefined ;
10991098 }
11001099
1101- protected preHandleOptions ( options : ICompileOptions ) {
1100+ protected preHandleOptions ( options : BuilderOptions ) {
11021101
11031102 const config = this . project . GetConfiguration < AnyGccCompileData > ( ) . config ;
11041103
@@ -1156,7 +1155,7 @@ class C51CodeBuilder extends CodeBuilder {
11561155 return undefined ;
11571156 }
11581157
1159- protected preHandleOptions ( options : ICompileOptions ) {
1158+ protected preHandleOptions ( options : BuilderOptions ) {
11601159
11611160 const config = this . project . GetConfiguration < C51BaseCompileData > ( ) . config ;
11621161 const toolchain = this . project . getToolchain ( ) ;
0 commit comments