Solve issues with hip-vdi runtime static lib
1.Combine libamdhip64_static_base.a and libamdvdi_static.a into libamdhip64_static.a.
2.Let hipcc use -use-staticlib to link libamdhip64_static.a.
3.Add some samples for static lib.
4.Fix compiling failure of code object.
Change-Id: Ic8c95228eb139058da8b5d66ba8439486154ca6f
[ROCm/hip-tests commit: 6c0a08ba4f]
Этот коммит содержится в:
@@ -13,10 +13,15 @@ ifeq (${HIP_PLATFORM}, nvcc)
|
||||
endif
|
||||
|
||||
EXE=bit_extract
|
||||
EXE_STATIC=bit_extract_static
|
||||
|
||||
$(EXE): bit_extract.cpp
|
||||
$(HIPCC) $(HIPCC_FLAGS) $< -o $@
|
||||
|
||||
$(EXE_STATIC): bit_extract.cpp
|
||||
$(HIPCC) -use-staticlib $(HIPCC_FLAGS) $< -o $@
|
||||
|
||||
all: $(EXE) $(EXE_STATIC)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(EXE)
|
||||
rm -f *.o $(EXE) $(EXE_STATIC)
|
||||
|
||||
@@ -11,7 +11,7 @@ else
|
||||
SOURCES=square.cpp
|
||||
endif
|
||||
|
||||
all: square.out
|
||||
all: square.out square.out.static
|
||||
|
||||
# Step
|
||||
square.cpp: square.cu
|
||||
@@ -20,5 +20,8 @@ square.cpp: square.cu
|
||||
square.out: $(SOURCES)
|
||||
$(HIPCC) $(CXXFLAGS) $(SOURCES) -o $@
|
||||
|
||||
square.out.static: $(SOURCES)
|
||||
$(HIPCC) -use-staticlib $(CXXFLAGS) $(SOURCES) -o $@
|
||||
|
||||
clean:
|
||||
rm -f *.o *.out square.cpp
|
||||
rm -f *.o *.out *.out.static square.cpp
|
||||
|
||||
Ссылка в новой задаче
Block a user