Skip to content

Commit 42c49d8

Browse files
authored
Windows build fixes. (#56)
Signed-off-by: John Plevyak <[email protected]>
1 parent c0fac1b commit 42c49d8

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

.bazelrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

BUILD

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ licenses(["notice"]) # Apache 2
22

33
package(default_visibility = ["//visibility:public"])
44

5+
COPTS = select({
6+
"@bazel_tools//src/conditions:windows": [
7+
"/std:c++17",
8+
"-DWITHOUT_ZLIB",
9+
],
10+
"//conditions:default": [
11+
"-std=c++17",
12+
"-DWITHOUT_ZLIB",
13+
],
14+
})
15+
516
cc_library(
617
name = "include",
718
hdrs = glob(["include/proxy-wasm/**/*.h"]),
@@ -19,7 +30,7 @@ cc_library(
1930
"src/**/v8*",
2031
],
2132
) + glob(["src/**/*.h"]),
22-
copts = ["-DWITHOUT_ZLIB=1"],
33+
copts = COPTS,
2334
deps = [
2435
":include",
2536
"@com_google_protobuf//:protobuf_lite",
@@ -30,6 +41,7 @@ cc_library(
3041
cc_test(
3142
name = "wasm_vm_test",
3243
srcs = ["wasm_vm_test.cc"],
44+
copts = COPTS,
3345
deps = [
3446
":lib",
3547
"@com_google_googletest//:gtest",
@@ -40,6 +52,7 @@ cc_test(
4052
cc_test(
4153
name = "context_test",
4254
srcs = ["context_test.cc"],
55+
copts = COPTS,
4356
deps = [
4457
":include",
4558
"@com_google_googletest//:gtest",

include/proxy-wasm/context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
#pragma once
1717

18-
#include <time.h>
19-
2018
#include <atomic>
2119
#include <chrono>
20+
#include <ctime>
2221
#include <functional>
2322
#include <iostream>
2423
#include <map>
2524
#include <memory>
25+
#include <string>
2626
#include <vector>
2727

2828
#include "include/proxy-wasm/context_interface.h"

include/proxy-wasm/wasm_vm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include <functional>
1919
#include <memory>
20+
#include <string>
2021
#include <optional>
2122

2223
#include "include/proxy-wasm/word.h"

0 commit comments

Comments
 (0)