@@ -144,8 +144,6 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
144
144
.Default (llvm::DebugCompressionType::None);
145
145
}
146
146
147
- Opts.RelaxELFRelocations = !Args.hasArg (OPT_mrelax_relocations_no);
148
- Opts.SSE2AVX = Args.hasArg (OPT_msse2avx);
149
147
if (auto *DwarfFormatArg = Args.getLastArg (OPT_gdwarf64, OPT_gdwarf32))
150
148
Opts.Dwarf64 = DwarfFormatArg->getOption ().matches (OPT_gdwarf64);
151
149
Opts.DwarfVersion = getLastArgIntValue (Args, OPT_dwarf_version_EQ, 2 , Diags);
@@ -236,6 +234,9 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
236
234
Opts.EmitCompactUnwindNonCanonical =
237
235
Args.hasArg (OPT_femit_compact_unwind_non_canonical);
238
236
Opts.Crel = Args.hasArg (OPT_crel);
237
+ Opts.ImplicitMapsyms = Args.hasArg (OPT_mmapsyms_implicit);
238
+ Opts.X86RelaxRelocations = !Args.hasArg (OPT_mrelax_relocations_no);
239
+ Opts.X86Sse2Avx = Args.hasArg (OPT_msse2avx);
239
240
240
241
Opts.AsSecureLogFile = Args.getLastArgValue (OPT_as_secure_log_file);
241
242
@@ -294,8 +295,9 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
294
295
MCOptions.EmitCompactUnwindNonCanonical = Opts.EmitCompactUnwindNonCanonical ;
295
296
MCOptions.MCSaveTempLabels = Opts.SaveTemporaryLabels ;
296
297
MCOptions.Crel = Opts.Crel ;
297
- MCOptions.X86RelaxRelocations = Opts.RelaxELFRelocations ;
298
- MCOptions.X86Sse2Avx = Opts.SSE2AVX ;
298
+ MCOptions.ImplicitMapSyms = Opts.ImplicitMapsyms ;
299
+ MCOptions.X86RelaxRelocations = Opts.X86RelaxRelocations ;
300
+ MCOptions.X86Sse2Avx = Opts.X86Sse2Avx ;
299
301
MCOptions.CompressDebugSections = Opts.CompressDebugSections ;
300
302
MCOptions.AsSecureLogFile = Opts.AsSecureLogFile ;
301
303
@@ -343,10 +345,6 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
343
345
// MCObjectFileInfo needs a MCContext reference in order to initialize itself.
344
346
std::unique_ptr<MCObjectFileInfo> MOFI (
345
347
TheTarget->createMCObjectFileInfo (Ctx, PIC));
346
- if (Opts.DarwinTargetVariantTriple )
347
- MOFI->setDarwinTargetVariantTriple (*Opts.DarwinTargetVariantTriple );
348
- if (!Opts.DarwinTargetVariantSDKVersion .empty ())
349
- MOFI->setDarwinTargetVariantSDKVersion (Opts.DarwinTargetVariantSDKVersion );
350
348
Ctx.setObjectFileInfo (MOFI.get ());
351
349
352
350
if (Opts.GenDwarfForAssembly )
@@ -428,6 +426,13 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
428
426
Str.reset (TheTarget->createMCObjectStreamer (
429
427
T, Ctx, std::move (MAB), std::move (OW), std::move (CE), *STI));
430
428
Str.get ()->initSections (Opts.NoExecStack , *STI);
429
+ if (T.isOSBinFormatMachO () && T.isOSDarwin ()) {
430
+ Triple *TVT = Opts.DarwinTargetVariantTriple
431
+ ? &*Opts.DarwinTargetVariantTriple
432
+ : nullptr ;
433
+ Str->emitVersionForTarget (T, VersionTuple (), TVT,
434
+ Opts.DarwinTargetVariantSDKVersion );
435
+ }
431
436
}
432
437
433
438
// When -fembed-bitcode is passed to clang_as, a 1-byte marker
0 commit comments