diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 000000000..ff6db819b --- /dev/null +++ b/.bazelrc @@ -0,0 +1,4 @@ +build --enable_platform_specific_config +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 +build:windows --cxxopt=/std:c++17 diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 88700c44c..752b662be 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -30,13 +30,13 @@ jobs: key: bazel-cache-${{ runner.os }} - name: Build All (Windows) if: ${{matrix.os == 'windows-latest' }} - run: bazel --output_user_root=~/.bazel/cache build --cxxopt=/std:c++17 //... + run: bazel --output_user_root=~/.bazel/cache build //... - name: Test All (Windows) if: ${{matrix.os == 'windows-latest' }} - run: bazel --output_user_root=~/.bazel/cache test --cxxopt=/std:c++17 //... + run: bazel --output_user_root=~/.bazel/cache test //... - name: Build All (Linux, MacOS) if: ${{ matrix.os != 'windows-latest' }} - run: bazel --output_user_root=~/.bazel/cache build --cxxopt=-std=c++17 //... + run: bazel --output_user_root=~/.bazel/cache build //... - name: Test All (Linux, MacOS) if: ${{ matrix.os != 'windows-latest' }} - run: bazel --output_user_root=~/.bazel/cache test --cxxopt=-std=c++17 //... + run: bazel --output_user_root=~/.bazel/cache test //... diff --git a/README.md b/README.md index fc9d6c773..67793bd55 100644 --- a/README.md +++ b/README.md @@ -386,15 +386,8 @@ fuzzer tests. ### Build using Bazel You can also use [Bazel](https://bazel.build/) to build the project. -On linux: ```sh -cd -bazel build --cxxopt=-std=c++17 :all -``` - -On windows: -```sh -bazel build --cxxopt=/std:c++17 :all +bazel build :all ``` ### Build a node.js package using Emscripten