Files
rocm-systems/samples
Siu Chi Chan a388eb1e6f SWDEV-355608 - deprecate/cleanup hipcc link flags (#3128)
- deprecate -use-staticlib, -use-sharedlib which no longer provide any
functional values
- use --hip-link instead of specifying the HIP runtime by name when
linking
- fix linker option bug in HIT test's cmake
- update build options for unit tests requiring pthread or rt

Change-Id: Ib49978773c80fb40c71dc52b050ce921943ee3e4
2023-01-23 22:42:52 -08:00
..

Build procedure

We provide Makefile and CMakeLists.txt to build the samples seperately.

1.Makefile supports shared lib of hip-rocclr runtime and nvcc.

To build a sample, just type in sample folder,

make

2.CMakeLists.txt can support shared and static libs of hip-rocclr runtime.

To build a sample, run in the sample folder,

mkdir -p build && cd build

rm -rf * (to clear up)

a. to build with shared libs, run

cmake ..

b. to build with static libs, run

cmake -DCMAKE_PREFIX_PATH="<ROCM_PATH>/llvm/lib/cmake" ..

Then run,

make

Note that if you want debug version, add "-DCMAKE_BUILD_TYPE=Debug" in cmake cmd.