Skip to content

Commit

Permalink
Update amdvlk_build_for_tag.py (#339)
Browse files Browse the repository at this point in the history
* Support gcc 10 toolset on RHEL
  • Loading branch information
WenqingLiAMD committed Oct 25, 2023
1 parent 0a6c4a3 commit e777084
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/amdvlk_build_for_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ def MakeDriverPackage(self, arch):
eprint('SPVGEN: fetch external sources failed')
exit(-1)

def useGccToolset():
return self.distro == 'RHEL'
gccToolsetCmd = "source scl_source enable gcc-toolset-10 &&" if useGccToolset() else ""

self.buildDir = 'xgl/Release64' if arch == '64' else 'xgl/Release32'
cmakeFlags = ' -G Ninja -S xgl -B ' + self.buildDir + ' -DBUILD_WAYLAND_SUPPORT=ON -DPACKAGE_VERSION=' + self.version + ' -DXGL_BUILD_TOOLS=ON'
cFlags = '' if arch == '64' else ' -DCMAKE_C_FLAGS=\"-m32 -march=i686\" -DCMAKE_CXX_FLAGS=\"-m32 -march=i686\"'
Expand All @@ -176,7 +180,7 @@ def MakeDriverPackage(self, arch):
os.makedirs(self.buildDir)

# Build driver
if os.system(cmakeName + cmakeFlags + cFlags):
if os.system(gccToolsetCmd + cmakeName + cmakeFlags + cFlags):
eprint(cmakeName + cmakeFlags + cFlags + ' failed')
exit(-1)

Expand Down

0 comments on commit e777084

Please sign in to comment.