1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

remove freetype submodule accidentally added in #1890

This commit is contained in:
joe-conigliaro 2019-09-08 19:02:03 +10:00 committed by Alexander Medvednikov
parent e78e284380
commit cb6fadf917
4 changed files with 23 additions and 22 deletions

View File

@ -118,13 +118,14 @@ fn (v mut V) cc() {
if v.os == .mac {
a << '-mmacosx-version-min=10.7'
}
cflags := v.get_os_cflags()
// 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 }
a << flag.format()
}
// add .o files
for flag in v.get_os_cflags() {
for flag in cflags {
if !flag.value.ends_with('.o') { continue }
a << flag.format()
}
@ -216,8 +217,9 @@ fn (c mut V) cc_windows_cross() {
c.out_name = c.out_name + '.exe'
}
mut args := '-o $c.out_name -w -L. '
cflags := c.get_os_cflags()
// -I flags
for flag in c.get_os_cflags() {
for flag in cflags {
if flag.name != '-l' {
args += flag.format()
args += ' '
@ -236,7 +238,7 @@ fn (c mut V) cc_windows_cross() {
}
args += ' $c.out_name_c '
// -l flags (libs)
for flag in c.get_os_cflags() {
for flag in cflags {
if flag.name == '-l' {
args += flag.format()
args += ' '

View File

@ -301,23 +301,22 @@ pub fn (v mut V) cc_msvc() {
mut other_flags := []string{}
for flag in v.get_os_cflags() {
mut arg := flag.value
//println('fl: $flag.name | flag arg: $arg')
//println('fl: $flag.name | flag arg: $flag.value')
// We need to see if the flag contains -l
// -l isnt recognised and these libs will be passed straight to the linker
// by the compiler
if flag.name == '-l' {
if arg.ends_with('.dll') {
cerror('MSVC cannot link against a dll (`#flag -l $arg`)')
if flag.value.ends_with('.dll') {
cerror('MSVC cannot link against a dll (`#flag -l $flag.value`)')
}
// MSVC has no method of linking against a .dll
// TODO: we should look for .defs aswell
lib_lib := arg + '.lib'
lib_lib := flag.value + '.lib'
real_libs << lib_lib
}
else if flag.name == '-I' {
inc_paths << ' ' + flag.format() + ' '
inc_paths << flag.format()
}
else if flag.name == '-L' {
lib_paths << flag.value
@ -329,10 +328,11 @@ pub fn (v mut V) cc_msvc() {
// as for example for glfw3, compilation with gcc would fail.
}
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 {
other_flags << arg
other_flags << flag.value
}
}

1
thirdparty/freetype vendored

@ -1 +0,0 @@
Subproject commit e4504fd25d7d23797ccfef336a33491c0d654129