================
@@ -16,7 +16,7 @@
 
 // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s 
-flto=thin -c -o %t.call_thin.bc -DCALL_LIB
 // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s 
-flto=thin -c -o %t.define_thin.bc -DDEFINE_LIB
-// RUN: llvm-lto2 run -o %t.lto_thin -save-temps %t.call_thin.bc 
%t.define_thin.bc \
+// RUN: llvm-lto2 run --mcpu=cortex-m33 --float-abi=hard -o %t.lto_thin 
-save-temps %t.call_thin.bc %t.define_thin.bc \
----------------
chrisnc wrote:

I dug into this further as promised, and the error goes away for this test if 
you just remove the call to `printf` from the test, which the test expects to 
replace with a call to putchar. This means that the `llvm-lto2` invocation is 
eventually creating a new subtarget in which the target features and ABI are 
not inherited from the settings of either input file, and because the ones it 
lands on are incompatible, an error is raised. Pre-existing functions that were 
generated with a specific ABI and features are preserved as you would expect.

https://github.com/llvm/llvm-project/pull/111334
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to