@@ -1293,8 +1293,15 @@ amd_comgr_status_t AMDGPUCompiler::unbundle() {
1293
1293
size_t Index = OutputPrefix.find_last_of (" ." );
1294
1294
OutputPrefix = OutputPrefix.substr (0 , Index);
1295
1295
1296
- // Bundler target and output names
1297
- for (auto Entry : ActionInfo->BundleEntryIDs ) {
1296
+ // TODO: Log Command (see linkBitcodeToBitcode() unbundling)
1297
+ if (env::shouldEmitVerboseLogs ()) {
1298
+ LogS << " Extracting Bundle:\n "
1299
+ << " Input Filename: " << BundlerConfig.InputFileNames [0 ] << " \n "
1300
+ << " Unbundled Files Extension: ." << FileExtension << " \n " ;
1301
+ }
1302
+
1303
+ for (size_t I = 0 ; I < ActionInfo->BundleEntryIDs .size (); I++) {
1304
+ auto Entry = ActionInfo->BundleEntryIDs [I];
1298
1305
BundlerConfig.TargetNames .push_back (Entry);
1299
1306
1300
1307
// Add an output file for each target
@@ -1304,21 +1311,17 @@ amd_comgr_status_t AMDGPUCompiler::unbundle() {
1304
1311
// TODO: Switch this to LLVM path APIs
1305
1312
std::string OutputFilePath = OutputDir.str ().str () + " /" + OutputFileName;
1306
1313
BundlerConfig.OutputFileNames .push_back (OutputFilePath);
1314
+
1315
+ if (env::shouldEmitVerboseLogs ()) {
1316
+ LogS << " \t Bundle Entry ID: " << BundlerConfig.TargetNames [I] << " \n "
1317
+ << " \t Output Filename: " << BundlerConfig.OutputFileNames [I]
1318
+ << " \n " ;
1319
+ LogS.flush ();
1320
+ }
1307
1321
}
1308
1322
1309
1323
OffloadBundler Bundler (BundlerConfig);
1310
1324
1311
- // TODO: log vectors, build clang command
1312
- if (env::shouldEmitVerboseLogs ()) {
1313
- LogS << " Extracting Bundle:\n "
1314
- << " \t Unbundled Files Extension: ." << FileExtension << " \n "
1315
- << " \t Bundle Entry ID: " << BundlerConfig.TargetNames [0 ] << " \n "
1316
- << " \t Input Filename: " << BundlerConfig.InputFileNames [0 ] << " \n "
1317
- << " \t Output Filename: " << BundlerConfig.OutputFileNames [0 ]
1318
- << " \n " ;
1319
- LogS.flush ();
1320
- }
1321
-
1322
1325
switch (Input->DataKind ) {
1323
1326
case AMD_COMGR_DATA_KIND_BC_BUNDLE: {
1324
1327
llvm::Error Err = Bundler.UnbundleFiles ();
0 commit comments