brintos

brintos / llvm-project-archived public Read only

0
0
Text · 518 B · dde7dac Raw
15 lines · c
1// Check that the -all_load flag to llvm-jitlink causes all objects from2// archives to be loaded, regardless of whether or not they're referenced.3//4// RUN: rm -rf %t && mkdir -p %t5// RUN: %clangxx -c -o %t/SetX.o  %S/Inputs/SetGlobalIntXInConstructor.cpp6// RUN: ar r %t/libSetX.a %t/SetX.o7// RUN: %clang -c -o %t/all_load.o %s8// RUN: %llvm_jitlink -all_load %t/all_load.o -L%t -lSetX9//10// REQUIRES: system-darwin && host-arch-compatible11 12int x = 0;13 14int main(int argc, char *argv[]) { return x == 1 ? 0 : 1; }15