occlum/demo/hello_bazel/build_bazel_sample.sh

11 lines
306 B
Bash
Executable File

#!/bin/bash
set -e
mkdir examples
cd examples
git clone https://github.com/bazelbuild/examples/ .
cd cpp-tutorial/stage3
export CC=/opt/occlum/toolchains/gcc/bin/occlum-gcc
export CXX=/opt/occlum/toolchains/gcc/bin/occlum-g++
bazel build --cxxopt=-std=c++11 --copt=-fPIC --linkopt=-pie //main:hello-world