1. Jason S
  2. llvm-testcases

Commits

Jason S  committed 379e091

was forgetting to use clang++ instead of clang: fixed

  • Participants
  • Parent commits fffa2da
  • Branches default

Comments (0)

Files changed (3)

File opt1/src/main.cpp

View file
 	bar1.setValue(5);
 	bar2.setValue(5);
 	bar1.setValue(bar1.fib(bar1.getValue()));
-	// fibify(bar2);
+	fibify(bar2);
 	printf("bar1.getValue() = %d\n", bar1.getValue());
 	printf("bar2.getValue() = %d\n", bar2.getValue());
 	printf("bar1.factorial(bar1.getValue()) = %d\n",
 	    bar1.factorial(bar1.getValue()));
-	// printf("getfact(bar1) = %d\n", getfact(bar1));
+	printf("getfact(bar1) = %d\n", getfact(bar1));
 	return 0;
 }

File opt1/src/wscript

View file
 def use_bitcode(ctx, output_base):
  ctx(rule='${LLVM_DIS} ${SRC} -o=${TGT}', source=output_base+'.bc', target=output_base+'.ll')
  ctx(rule='${LLC} -O=3 ${SRC} -o ${TGT}', source=output_base+'.bc', target=output_base+'.s')
- ctx(rule='${CLANG} ${SRC} -o ${TGT}', source=output_base+'.bc', target=output_base)
+ ctx(rule='${CLANG_PP} ${SRC} -o ${TGT}', source=output_base+'.bc', target=output_base)
 
 def build(ctx):
  print ctx.env.CLANG

File opt1/wscript

View file
  ctx.env.CXXFLAGS = ['-O4', '-emit-llvm']
  paths = ['/usr/bin', '/opt/local/bin', '/opt/local/libexec/llvm-3.1/bin']
  ctx.find_program('clang', var='CLANG', path_list=paths)
+ ctx.find_program('clang++', var='CLANG_PP', path_list=paths)
  ctx.find_program('llvm-dis', var='LLVM_DIS', path_list=paths)
  ctx.find_program('llvm-ld', var='LLVM_LD', path_list=paths)
  ctx.find_program('llc', var='LLC', path_list=paths)