Commit d6d10f96 by Alexis Hetu Committed by Alexis Hétu

Fixed official chromium build on Linux

A warning treated as an error was causing the official build to fail. Added -Wno-unused-result to the LLVM build file to solve the issue. Also ran 'git cl format' on the BUILD.gn files to fix all formatting issues. Change-Id: I235c7d9d3e60f788e1dc694a40991c214e6c77e3 Reviewed-on: https://swiftshader-review.googlesource.com/8110Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent b9dda64e
......@@ -32,7 +32,9 @@ config("swiftshader_main_private_config") {
}
source_set("swiftshader_main") {
deps = [ "../Common:swiftshader_common" ]
deps = [
"../Common:swiftshader_common",
]
sources = [
"Config.cpp",
......@@ -42,8 +44,8 @@ source_set("swiftshader_main") {
if (is_linux) {
sources += [
"libX11.cpp",
"FrameBufferX11.cpp",
"libX11.cpp",
]
} else if (is_mac) {
sources += [ "FrameBufferOSX.mm" ]
......@@ -59,6 +61,7 @@ source_set("swiftshader_main") {
configs -= [ "//build/config/win:unicode" ]
libs = [ "dxguid.lib" ] # For FrameBufferDD
}
configs += [ ":swiftshader_main_private_config" ]
include_dirs = [
......@@ -70,7 +73,7 @@ source_set("swiftshader_main") {
include_dirs += [ "../../include" ]
libs = [
"Quartz.framework",
"Cocoa.framework"
"Cocoa.framework",
]
}
}
......@@ -26,10 +26,10 @@ config("swiftshader_opengl_common_private_config") {
source_set("swiftshader_opengl_common") {
sources = [
"debug.cpp",
"Image.cpp",
"Object.cpp",
"MatrixStack.cpp",
"Object.cpp",
"debug.cpp",
]
configs += [ ":swiftshader_opengl_common_private_config" ]
......
......@@ -38,32 +38,34 @@ config("swiftshader_opengl_compiler_private_config") {
}
source_set("swiftshader_opengl_compiler") {
deps = [ "preprocessor:swiftshader_opengl_preprocessor" ]
deps = [
"preprocessor:swiftshader_opengl_preprocessor",
]
sources = [
"AnalyzeCallDepth.cpp",
"Compiler.cpp",
"debug.cpp",
"Diagnostics.cpp",
"DirectiveHandler.cpp",
"glslang_lex.cpp",
"glslang_tab.cpp",
"InfoSink.cpp",
"Initialize.cpp",
"InitializeParseContext.cpp",
"IntermTraverse.cpp",
"Intermediate.cpp",
"intermOut.cpp",
"OutputASM.cpp",
"parseConst.cpp",
"ParseHelper.cpp",
"PoolAlloc.cpp",
"SymbolTable.cpp",
"TranslatorASM.cpp",
"util.cpp",
"ValidateGlobalInitializer.cpp",
"ValidateLimitations.cpp",
"ValidateSwitch.cpp",
"debug.cpp",
"glslang_lex.cpp",
"glslang_tab.cpp",
"intermOut.cpp",
"parseConst.cpp",
"util.cpp",
]
if (is_linux || is_mac) {
......
......@@ -21,9 +21,7 @@ config("swiftshader_opengl_preprocessor_private_config") {
"/wd4702", # unreachable code (in autogenerated code)
]
} else {
cflags = [
"-DLOG_TAG=\"swiftshader_opengl_compiler\"",
]
cflags = [ "-DLOG_TAG=\"swiftshader_opengl_compiler\"" ]
}
}
......@@ -42,7 +40,5 @@ source_set("swiftshader_opengl_preprocessor") {
"Tokenizer.cpp",
]
configs += [
":swiftshader_opengl_preprocessor_private_config",
]
configs += [ ":swiftshader_opengl_preprocessor_private_config" ]
}
......@@ -39,18 +39,18 @@ shared_library("swiftshader_libEGL") {
}
sources = [
"../common/Object.cpp",
"Config.cpp",
"Display.cpp",
"Surface.cpp",
"libEGL.cpp",
"main.cpp",
"../common/Object.cpp",
"libEGL.def",
"libEGL.rc",
"main.cpp",
"resource.h",
]
if(is_debug) {
if (is_debug) {
sources += [ "../common/debug.cpp" ]
}
......
......@@ -24,8 +24,7 @@ config("swiftshader_libGLESv2_private_config") {
"/wd4324", # structure was padded due to alignment specifier
]
if (is_clang)
{
if (is_clang) {
cflags += [
"-D__STDC_CONSTANT_MACROS",
"-D__STDC_LIMIT_MACROS",
......@@ -63,9 +62,6 @@ shared_library("swiftshader_libGLESv2") {
"Fence.cpp",
"Framebuffer.cpp",
"IndexDataManager.cpp",
"libGLESv2.cpp",
"libGLESv3.cpp",
"main.cpp",
"Program.cpp",
"Query.cpp",
"Renderbuffer.cpp",
......@@ -73,12 +69,15 @@ shared_library("swiftshader_libGLESv2") {
"Shader.cpp",
"Texture.cpp",
"TransformFeedback.cpp",
"utilities.cpp",
"VertexArray.cpp",
"VertexDataManager.cpp",
"libGLESv2.cpp",
"libGLESv2.def",
"libGLESv2.rc",
"libGLESv3.cpp",
"main.cpp",
"resource.h",
"utilities.cpp",
]
if (is_win) {
......
......@@ -32,15 +32,15 @@ config("swiftshader_reactor_private_config") {
source_set("swiftshader_reactor") {
deps = [
"../OpenGL/common:swiftshader_opengl_common",
"../../third_party/LLVM:swiftshader_llvm",
"../OpenGL/common:swiftshader_opengl_common",
]
sources = [
"LLVMReactor.cpp",
"Routine.cpp",
"LLVMRoutine.cpp",
"LLVMRoutineManager.cpp",
"Routine.cpp",
]
if (is_win) {
......
......@@ -29,7 +29,9 @@ config("swiftshader_renderer_private_config") {
}
source_set("swiftshader_renderer") {
deps = [ "../Shader:swiftshader_shader" ]
deps = [
"../Shader:swiftshader_shader",
]
sources = [
"Blitter.cpp",
......
......@@ -21,9 +21,7 @@ config("swiftshader_shader_private_config") {
]
if (is_clang) {
cflags += [
"-Wno-sign-compare",
]
cflags += [ "-Wno-sign-compare" ]
}
} else {
cflags = [ "-DLOG_TAG=\"swiftshader_shader\"" ]
......@@ -31,7 +29,9 @@ config("swiftshader_shader_private_config") {
}
source_set("swiftshader_shader") {
deps = [ "../Main:swiftshader_main" ]
deps = [
"../Main:swiftshader_main",
]
sources = [
"Constants.cpp",
......
......@@ -16,9 +16,12 @@ import("//testing/test.gni")
test("swiftshader_unittests") {
deps = [
"../../src/OpenGL/libGLESv2:swiftshader_libGLESv2",
"../../src/OpenGL/libEGL:swiftshader_libEGL",
"../../src/OpenGL/libGLESv2:swiftshader_libGLESv2",
"//testing/gtest",
]
sources = [ "main.cpp" ]
sources = [
"main.cpp",
]
}
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