Changeset 3671 in CLRX for CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp
- Timestamp:
- Jan 28, 2018, 9:23:05 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp
r3669 r3671 20 20 #include <CLRX/Config.h> 21 21 #include <cassert> 22 #include <cstdio> 22 23 #include <cstdint> 23 24 #include <algorithm> … … 422 423 Elf64Types::nobase, Elf64Types::nobase, 0, 4 }); 423 424 425 std::string target = input->target.c_str(); 426 if (target.empty() && !input->targetTripple.empty()) 427 { 428 target = input->targetTripple.c_str(); 429 char dbuf[20]; 430 snprintf(dbuf, 20, "-gfx%u%u%u", amdGpuArchValues.major, amdGpuArchValues.minor, 431 amdGpuArchValues.stepping); 432 target += dbuf; 433 } 424 434 // elf notes 425 435 elfBinGen64.addNote({"AMD", sizeof noteDescType1, noteDescType1, 1U}); … … 430 440 SULEV(*(uint32_t*)(noteBuf.get()+12), amdGpuArchValues.stepping); 431 441 elfBinGen64.addNote({"AMD", 0x1b, noteBuf.get(), 3U}); 432 if (!input->target.empty()) 433 elfBinGen64.addNote({"AMD", input->target.size(), 434 (const cxbyte*)input->target.c_str(), 0xbU}); 442 if (!target.empty()) 443 elfBinGen64.addNote({"AMD", target.size(), (const cxbyte*)target.c_str(), 0xbU}); 435 444 if (input->metadataSize != 0) 436 445 elfBinGen64.addNote({"AMD", input->metadataSize,
Note: See TracChangeset
for help on using the changeset viewer.