radeon/llvm/loader: convert hardcoded gpu name to option
authorVadim Girlin <vadimgirlin@gmail.com>
Fri, 25 May 2012 13:22:38 +0000 (17:22 +0400)
committerVadim Girlin <vadimgirlin@gmail.com>
Fri, 25 May 2012 13:22:38 +0000 (17:22 +0400)
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/radeon/loader.cpp

index 79348d594306f674e8988ed1b1bf0d30250dfe10..3ea8cd8900ef44179e0218ff32cd9d8104c6867f 100644 (file)
@@ -15,7 +15,8 @@ using namespace llvm;
 static cl::opt<std::string>
 InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-"));
 
-
+static cl::opt<std::string>
+TargetGPUName("gpu", cl::desc("target gpu name"), cl::value_desc("gpu_name"));
 
 int main(int argc, char ** argv)
 {
@@ -30,5 +31,5 @@ int main(int argc, char ** argv)
 
        Module * mod = M.get();
   
-       radeon_llvm_compile(wrap(mod), &bytes, &byte_count, "redwood", 1);
+       radeon_llvm_compile(wrap(mod), &bytes, &byte_count, TargetGPUName.c_str(), 1);
 }