remove freetype submodule accidentally added in #1890
parent
e78e284380
commit
cb6fadf917
|
@ -118,13 +118,14 @@ fn (v mut V) cc() {
|
||||||
if v.os == .mac {
|
if v.os == .mac {
|
||||||
a << '-mmacosx-version-min=10.7'
|
a << '-mmacosx-version-min=10.7'
|
||||||
}
|
}
|
||||||
|
cflags := v.get_os_cflags()
|
||||||
// add all flags (-I -l -L etc) not .o files
|
// add all flags (-I -l -L etc) not .o files
|
||||||
for flag in v.get_os_cflags() {
|
for flag in cflags {
|
||||||
if flag.value.ends_with('.o') { continue }
|
if flag.value.ends_with('.o') { continue }
|
||||||
a << flag.format()
|
a << flag.format()
|
||||||
}
|
}
|
||||||
// add .o files
|
// add .o files
|
||||||
for flag in v.get_os_cflags() {
|
for flag in cflags {
|
||||||
if !flag.value.ends_with('.o') { continue }
|
if !flag.value.ends_with('.o') { continue }
|
||||||
a << flag.format()
|
a << flag.format()
|
||||||
}
|
}
|
||||||
|
@ -216,8 +217,9 @@ fn (c mut V) cc_windows_cross() {
|
||||||
c.out_name = c.out_name + '.exe'
|
c.out_name = c.out_name + '.exe'
|
||||||
}
|
}
|
||||||
mut args := '-o $c.out_name -w -L. '
|
mut args := '-o $c.out_name -w -L. '
|
||||||
|
cflags := c.get_os_cflags()
|
||||||
// -I flags
|
// -I flags
|
||||||
for flag in c.get_os_cflags() {
|
for flag in cflags {
|
||||||
if flag.name != '-l' {
|
if flag.name != '-l' {
|
||||||
args += flag.format()
|
args += flag.format()
|
||||||
args += ' '
|
args += ' '
|
||||||
|
@ -236,11 +238,11 @@ fn (c mut V) cc_windows_cross() {
|
||||||
}
|
}
|
||||||
args += ' $c.out_name_c '
|
args += ' $c.out_name_c '
|
||||||
// -l flags (libs)
|
// -l flags (libs)
|
||||||
for flag in c.get_os_cflags() {
|
for flag in cflags {
|
||||||
if flag.name == '-l' {
|
if flag.name == '-l' {
|
||||||
args += flag.format()
|
args += flag.format()
|
||||||
args += ' '
|
args += ' '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println('Cross compiling for Windows...')
|
println('Cross compiling for Windows...')
|
||||||
winroot := '$ModPath/winroot'
|
winroot := '$ModPath/winroot'
|
||||||
|
|
|
@ -53,7 +53,7 @@ fn (table mut Table) parse_cflag(cflag string) {
|
||||||
allowed_flags := [
|
allowed_flags := [
|
||||||
'framework',
|
'framework',
|
||||||
'library',
|
'library',
|
||||||
'I', 'l', 'L',
|
'I', 'l', 'L',
|
||||||
]
|
]
|
||||||
mut flag := cflag.trim_space()
|
mut flag := cflag.trim_space()
|
||||||
if flag == '' {
|
if flag == '' {
|
||||||
|
|
|
@ -301,23 +301,22 @@ pub fn (v mut V) cc_msvc() {
|
||||||
mut other_flags := []string{}
|
mut other_flags := []string{}
|
||||||
|
|
||||||
for flag in v.get_os_cflags() {
|
for flag in v.get_os_cflags() {
|
||||||
mut arg := flag.value
|
//println('fl: $flag.name | flag arg: $flag.value')
|
||||||
//println('fl: $flag.name | flag arg: $arg')
|
|
||||||
|
|
||||||
// We need to see if the flag contains -l
|
// We need to see if the flag contains -l
|
||||||
// -l isnt recognised and these libs will be passed straight to the linker
|
// -l isnt recognised and these libs will be passed straight to the linker
|
||||||
// by the compiler
|
// by the compiler
|
||||||
if flag.name == '-l' {
|
if flag.name == '-l' {
|
||||||
if arg.ends_with('.dll') {
|
if flag.value.ends_with('.dll') {
|
||||||
cerror('MSVC cannot link against a dll (`#flag -l $arg`)')
|
cerror('MSVC cannot link against a dll (`#flag -l $flag.value`)')
|
||||||
}
|
}
|
||||||
// MSVC has no method of linking against a .dll
|
// MSVC has no method of linking against a .dll
|
||||||
// TODO: we should look for .defs aswell
|
// TODO: we should look for .defs aswell
|
||||||
lib_lib := arg + '.lib'
|
lib_lib := flag.value + '.lib'
|
||||||
real_libs << lib_lib
|
real_libs << lib_lib
|
||||||
}
|
}
|
||||||
else if flag.name == '-I' {
|
else if flag.name == '-I' {
|
||||||
inc_paths << ' ' + flag.format() + ' '
|
inc_paths << flag.format()
|
||||||
}
|
}
|
||||||
else if flag.name == '-L' {
|
else if flag.name == '-L' {
|
||||||
lib_paths << flag.value
|
lib_paths << flag.value
|
||||||
|
@ -329,18 +328,19 @@ pub fn (v mut V) cc_msvc() {
|
||||||
// as for example for glfw3, compilation with gcc would fail.
|
// as for example for glfw3, compilation with gcc would fail.
|
||||||
}
|
}
|
||||||
else if flag.value.ends_with('.o') {
|
else if flag.value.ends_with('.o') {
|
||||||
other_flags << flag.format().replace('.o', '.obj')
|
// msvc expects .obj not .o
|
||||||
|
other_flags << '"${flag.value}bj"'
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
other_flags << arg
|
other_flags << flag.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include the base paths
|
// Include the base paths
|
||||||
a << ' -I "$r.ucrt_include_path" '
|
a << '-I "$r.ucrt_include_path"'
|
||||||
a << ' -I "$r.vs_include_path" '
|
a << '-I "$r.vs_include_path"'
|
||||||
a << ' -I "$r.um_include_path" '
|
a << '-I "$r.um_include_path"'
|
||||||
a << ' -I "$r.shared_include_path" '
|
a << '-I "$r.shared_include_path"'
|
||||||
|
|
||||||
a << inc_paths
|
a << inc_paths
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit e4504fd25d7d23797ccfef336a33491c0d654129
|
|
Loading…
Reference in New Issue