Change generator target for using optional target flags for apps/blur#5536
Change generator target for using optional target flags for apps/blur#5536aankit-ca wants to merge 1 commit intohalide:mainfrom
Conversation
Without the change: HL_TARGET=arm-64-android-hvx_128 make bin/arm-64-android/test would have target=arm-64-android instead of arm-64-android-hvx_128
|
I'm not sure I like this fix -- it changes the pattern we use ~everywhere else in Make. Why can't the user just do |
|
This seemed like a quick fix for #5523. |
|
I think this is a good change, but I think maybe we should go ahead and do it for all the apps? The reason I think it is good is because the strategy used for selecting compilers in Makefile.inc doesn't work without it. We shouldn't need a different host compiler/linker flag for each possible combination of optional target flags, only the arch/OS. Also, I think the current thing is simply broken. |
|
I'll prep a PR to make this change uniformly across the apps. |
|
I don't think this is a good change. It's much better to distinguish between Halide targets using the make target. Messing with environment variables and having the makefile depend on them breaks make's dependency tracking when you're changing targets. Most makefile rules should entirely ignore HL_TARGET. The only exception is generic targets like "test" |
|
Here's how to select compilers for cross-compilation without depending on env vars: |
|
(See #5539 for a complete suite of this change.) |
|
At this point it seems like this change isn't likely to happen, at least not in this form. |
Without the change:
HL_TARGET=arm-64-android-hvx_128 make bin/arm-64-android/test
would have target=arm-64-android instead of arm-64-android-hvx_128
@dsharletg PTAL