This commit makes the toolchain easier to use in two folds: 1. When compiling C/C++ source files, no need to add "-fPIC -pie" flags manually; 2. When running executables generated by the Occlum toolchain on Linux, no need to set the `LD_LIBRARY_PATH` manually.
11 lines
278 B
Bash
Executable File
11 lines
278 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 //main:hello-world
|