Commit d7260e20 by Alexis Hetu Committed by Alexis Hétu

Fixed building SwiftShader libraries within Chromium on Windows

With this fix, SwiftShader libraries can successfully be built on Windows using Chromium's build system and produce fully functional libraries. Main issue was: the .rc files had not been included in the 'sources' section. Change-Id: Iec77f09c10af19828c52f10d01b405a7e352afab Reviewed-on: https://swiftshader-review.googlesource.com/5800Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarCorentin Wallez <cwallez@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 68f564d1
...@@ -42,6 +42,9 @@ shared_library("swiftshader_libEGL") { ...@@ -42,6 +42,9 @@ shared_library("swiftshader_libEGL") {
"libEGL.cpp", "libEGL.cpp",
"main.cpp", "main.cpp",
"../common/Object.cpp", "../common/Object.cpp",
"libEGL.def",
"libEGL.rc",
"resource.h",
] ]
if(is_debug) if(is_debug)
...@@ -59,6 +62,11 @@ shared_library("swiftshader_libEGL") { ...@@ -59,6 +62,11 @@ shared_library("swiftshader_libEGL") {
configs -= [ configs -= [
"//build/config/win:unicode" "//build/config/win:unicode"
] ]
ldflags = [
"/DEF:" + rebase_path("libGLESv2.def", root_build_dir),
"/ignore:4070", # outputting 'swiftshader_libEGL.dll' instead of 'libEGL.dll'
]
} else if (host_os == "linux") { } else if (host_os == "linux") {
sources += [ sources += [
"../../Main/libX11.cpp", "../../Main/libX11.cpp",
......
...@@ -66,12 +66,20 @@ shared_library("swiftshader_libGLESv2") { ...@@ -66,12 +66,20 @@ shared_library("swiftshader_libGLESv2") {
"utilities.cpp", "utilities.cpp",
"VertexArray.cpp", "VertexArray.cpp",
"VertexDataManager.cpp", "VertexDataManager.cpp",
"libGLESv2.def",
"libGLESv2.rc",
"resource.h",
] ]
if (host_os == "win") { if (host_os == "win") {
configs -= [ configs -= [
"//build/config/win:unicode" "//build/config/win:unicode"
] ]
ldflags = [
"/DEF:" + rebase_path("libGLESv2.def", root_build_dir),
"/ignore:4070", # outputting 'swiftshader_libGLESv2.dll' instead of 'libGLESv2.dll'
]
} }
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment