tcc: 64 bit by default
							parent
							
								
									6c51d0bb78
								
							
						
					
					
						commit
						2391c72e4b
					
				|  | @ -73,6 +73,20 @@ fn (v mut V) cc() { | ||||||
| 			return | 			return | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	// arguments for the C compiler
 | ||||||
|  | 	mut a := [v.pref.cflags, '-std=gnu11', | ||||||
|  | 		'-Wall', | ||||||
|  | 		'-Wextra', | ||||||
|  | 		// TODO : activate -Werror once no warnings remain
 | ||||||
|  | //		'-Werror',
 | ||||||
|  | 		// TODO : try and remove the below workaround options when the corresponding
 | ||||||
|  | 		// warnings are totally fixed/removed
 | ||||||
|  | 		'-Wno-unused-variable', | ||||||
|  | 		'-Wno-unused-but-set-variable', | ||||||
|  | 		'-Wno-unused-parameter', | ||||||
|  | 		'-Wno-unused-result', | ||||||
|  | 		'-Wno-missing-braces', | ||||||
|  | 		'-Wno-unused-label'] | ||||||
| 	// TCC on Linux by default, unless -cc was provided
 | 	// TCC on Linux by default, unless -cc was provided
 | ||||||
| 	// TODO if -cc = cc, TCC is still used, default compiler should be
 | 	// TODO if -cc = cc, TCC is still used, default compiler should be
 | ||||||
| 	// used instead.
 | 	// used instead.
 | ||||||
|  | @ -95,6 +109,7 @@ fn (v mut V) cc() { | ||||||
| 				//os.mkdir('/var/tmp/tcc/lib/tcc/')
 | 				//os.mkdir('/var/tmp/tcc/lib/tcc/')
 | ||||||
| 				//os.create('/var/tmp/tcc/lib/tcc/libtcc1.a')
 | 				//os.create('/var/tmp/tcc/lib/tcc/libtcc1.a')
 | ||||||
| 				v.pref.ccompiler = tcc_path | 				v.pref.ccompiler = tcc_path | ||||||
|  | 				a << '-m64' | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		} $else { | 		} $else { | ||||||
|  | @ -103,20 +118,6 @@ fn (v mut V) cc() { | ||||||
| 	} | 	} | ||||||
| 	//linux_host := os.user_os() == 'linux'
 | 	//linux_host := os.user_os() == 'linux'
 | ||||||
| 	v.log('cc() isprod=$v.pref.is_prod outname=$v.out_name') | 	v.log('cc() isprod=$v.pref.is_prod outname=$v.out_name') | ||||||
| 	// arguments for the C compiler
 |  | ||||||
| 	mut a := [v.pref.cflags, '-std=gnu11', |  | ||||||
| 		'-Wall', |  | ||||||
| 		'-Wextra', |  | ||||||
| 		// TODO : activate -Werror once no warnings remain
 |  | ||||||
| //		'-Werror',
 |  | ||||||
| 		// TODO : try and remove the below workaround options when the corresponding
 |  | ||||||
| 		// warnings are totally fixed/removed
 |  | ||||||
| 		'-Wno-unused-variable', |  | ||||||
| 		'-Wno-unused-but-set-variable', |  | ||||||
| 		'-Wno-unused-parameter', |  | ||||||
| 		'-Wno-unused-result', |  | ||||||
| 		'-Wno-missing-braces', |  | ||||||
| 		'-Wno-unused-label'] |  | ||||||
| 
 | 
 | ||||||
| 	if v.pref.is_so { | 	if v.pref.is_so { | ||||||
| 		a << '-shared -fPIC '// -Wl,-z,defs'
 | 		a << '-shared -fPIC '// -Wl,-z,defs'
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue