mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #5030 from chrissnow/uVision-LDFlags
Export uVision linker flags so that bootloader projects build correctlypull/4838/merge
						commit
						814eaa99fe
					
				| 
						 | 
				
			
			@ -172,6 +172,7 @@ class Uvision(Exporter):
 | 
			
		|||
        flags['asm_flags'] = asm_flag_string
 | 
			
		||||
        # All non-asm flags are in one template field
 | 
			
		||||
        c_flags = list(set(flags['c_flags'] + flags['cxx_flags'] +flags['common_flags']))
 | 
			
		||||
        ld_flags = list(set(flags['ld_flags'] ))
 | 
			
		||||
        # These flags are in template to be set by user i n IDE
 | 
			
		||||
        template = ["--no_vla", "--cpp", "--c99"]
 | 
			
		||||
        # Flag is invalid if set in template
 | 
			
		||||
| 
						 | 
				
			
			@ -179,6 +180,7 @@ class Uvision(Exporter):
 | 
			
		|||
        invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x) 
 | 
			
		||||
        flags['c_flags'] = [flag.replace('"','\\"') for flag in c_flags if not invalid_flag(flag)]
 | 
			
		||||
        flags['c_flags'] = " ".join(flags['c_flags'])
 | 
			
		||||
        flags['ld_flags'] = " ".join(flags['ld_flags'])
 | 
			
		||||
        return flags
 | 
			
		||||
 | 
			
		||||
    def format_src(self, srcs):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -410,7 +410,7 @@
 | 
			
		|||
            <ScatterFile>{{linker_script}}</ScatterFile>
 | 
			
		||||
            <IncludeLibs></IncludeLibs>
 | 
			
		||||
            <IncludeLibsPath></IncludeLibsPath>
 | 
			
		||||
            <Misc></Misc>
 | 
			
		||||
            <Misc>{{ld_flags}}</Misc>
 | 
			
		||||
            <LinkerInputFile></LinkerInputFile>
 | 
			
		||||
            <DisabledWarnings></DisabledWarnings>
 | 
			
		||||
          </LDads>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue