Commit 84ea9a70 by Jim Stichnoth

Subzero: Fix target attribute when SZTARGET is defined.

Adds the right macro voodoo so that when Subzero is built for a single target, e.g.: $ make -f Makefile.standalone SZTARGET=ARM32 we get output like this: $ ./pnacl-sz --build-atts target_ARM32 rather than this: $ ./pnacl-sz --build-atts target_SZTARGET BUG= none R=eholk@chromium.org Review URL: https://codereview.chromium.org/2306273002 .
parent 5d5b6627
......@@ -156,7 +156,7 @@ struct {
/// Dumps values of build attributes to Stream if Stream is non-null.
void dumpBuildAttributes(Ostream &Str) {
// List the supported targets.
#define SUBZERO_TARGET(TARGET) Str << "target_" #TARGET << "\n";
#define SUBZERO_TARGET(TARGET) Str << "target_" XSTRINGIFY(TARGET) "\n";
#include "SZTargets.def"
const char *Prefix[2] = {"no", "allow"};
for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes);
......
......@@ -47,6 +47,9 @@
#include <utility>
#include <vector>
#define XSTRINGIFY(x) STRINGIFY(x)
#define STRINGIFY(x) #x
namespace Ice {
class Assembler;
......
......@@ -14,8 +14,7 @@
#include "IceRevision.h"
#define XSTRINGIFY(x) STRINGIFY(x)
#define STRINGIFY(x) #x
#include "IceDefs.h" // XSTRINGIFY
#ifndef SUBZERO_REVISION
#define SUBZERO_REVISION unknown
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment