Make it work on Windows.
This commit is contained in:
		
							parent
							
								
									0608b9d682
								
							
						
					
					
						commit
						dccaa59c98
					
				
							
								
								
									
										29
									
								
								BUILD.bazel
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								BUILD.bazel
									
									
									
									
									
								
							@ -10,7 +10,9 @@ licenses(["notice"])  # Mixed: BSD, MIT, Khronos, Apache 2.0
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
exports_files(["LICENSE"])
 | 
					exports_files(["LICENSE"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COMMON_COPTS = [
 | 
					COMMON_COPTS = select({
 | 
				
			||||||
 | 
					    "@bazel_tools//src/conditions:windows": [""],
 | 
				
			||||||
 | 
					    "//conditions:default": [
 | 
				
			||||||
        "-Wall",
 | 
					        "-Wall",
 | 
				
			||||||
        "-Wuninitialized",
 | 
					        "-Wuninitialized",
 | 
				
			||||||
        "-Wunused",
 | 
					        "-Wunused",
 | 
				
			||||||
@ -24,7 +26,8 @@ COMMON_COPTS = [
 | 
				
			|||||||
        "-fvisibility-inlines-hidden",
 | 
					        "-fvisibility-inlines-hidden",
 | 
				
			||||||
        "-fno-exceptions",
 | 
					        "-fno-exceptions",
 | 
				
			||||||
        "-fno-rtti",
 | 
					        "-fno-rtti",
 | 
				
			||||||
]
 | 
					    ],
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cc_library(
 | 
					cc_library(
 | 
				
			||||||
    name = "glslang",
 | 
					    name = "glslang",
 | 
				
			||||||
@ -43,8 +46,12 @@ cc_library(
 | 
				
			|||||||
        ],
 | 
					        ],
 | 
				
			||||||
    ) + [
 | 
					    ) + [
 | 
				
			||||||
        "OGLCompilersDLL/InitializeDll.cpp",
 | 
					        "OGLCompilersDLL/InitializeDll.cpp",
 | 
				
			||||||
        "glslang/OSDependent/Unix/ossource.cpp",
 | 
					    ] + select({
 | 
				
			||||||
    ],
 | 
					        "@bazel_tools//src/conditions:windows":
 | 
				
			||||||
 | 
						    ["glslang/OSDependent/Windows/ossource.cpp"],
 | 
				
			||||||
 | 
					        "//conditions:default":
 | 
				
			||||||
 | 
						    ["glslang/OSDependent/Unix/ossource.cpp"],
 | 
				
			||||||
 | 
					    }),
 | 
				
			||||||
    hdrs = glob([
 | 
					    hdrs = glob([
 | 
				
			||||||
        "glslang/Include/*.h",
 | 
					        "glslang/Include/*.h",
 | 
				
			||||||
        "glslang/MachineIndependent/*.h",
 | 
					        "glslang/MachineIndependent/*.h",
 | 
				
			||||||
@ -61,13 +68,12 @@ cc_library(
 | 
				
			|||||||
        "AMD_EXTENSIONS",
 | 
					        "AMD_EXTENSIONS",
 | 
				
			||||||
        "ENABLE_HLSL=0",
 | 
					        "ENABLE_HLSL=0",
 | 
				
			||||||
        "ENABLE_OPT=0",
 | 
					        "ENABLE_OPT=0",
 | 
				
			||||||
        "GLSLANG_OSINCLUDE_UNIX",
 | 
					 | 
				
			||||||
        "NV_EXTENSIONS",
 | 
					        "NV_EXTENSIONS",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    linkopts = [
 | 
					    linkopts = select({
 | 
				
			||||||
        "-lm",
 | 
					        "@bazel_tools//src/conditions:windows": [""],
 | 
				
			||||||
        "-lpthread",
 | 
					        "//conditions:default": ["-lm", "-lpthread"],
 | 
				
			||||||
    ],
 | 
					    }),
 | 
				
			||||||
    linkstatic = 1,
 | 
					    linkstatic = 1,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -125,7 +131,10 @@ cc_library(
 | 
				
			|||||||
    ],
 | 
					    ],
 | 
				
			||||||
    copts = COMMON_COPTS,
 | 
					    copts = COMMON_COPTS,
 | 
				
			||||||
    includes = ["SPIRV"],
 | 
					    includes = ["SPIRV"],
 | 
				
			||||||
    linkopts = ["-lm"],
 | 
					    linkopts = select({
 | 
				
			||||||
 | 
					        "@bazel_tools//src/conditions:windows": [""],
 | 
				
			||||||
 | 
					        "//conditions:default": ["-lm"],
 | 
				
			||||||
 | 
					    }),
 | 
				
			||||||
    linkstatic = 1,
 | 
					    linkstatic = 1,
 | 
				
			||||||
    deps = [
 | 
					    deps = [
 | 
				
			||||||
        ":SPIRV_headers",
 | 
					        ":SPIRV_headers",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user