Add LDFLAGS for generating $APP.trace.exe
Add target to generate the trace files
Get non-local MDNode when assign ID to BBs

The old code uses the MDNode::get() which will create a FL_UNKNOWN type
MDNode. We should specify that the newly created MDNode is not function
local so that we can addOperand later.