This patch creates the __builtin_get_cpu_cache_line_size to wrap the cpu cache line size API from D74918.
What should the behavior of the builtin be if the calling function has its own target cpu like attribute((target("arch=sandybridge"))) and that CPU has a different size than the CPU that was passed on the command line?
Can this be "zv" and drop the "tu" from the second string?
I don't think there's a particularly good reason to expose this as a builtin, unless it's to be used by the standard library implementation. (Which again I do not think we should implement.)
I'm not sure what should happen as I'm not familiar with the library feature being implemented. As implemented here, the target attribute will be ignored and it will just follow the command line. Why do you say that following the attribute is not a great solution?
This say i368 which is not a valid cpu. Did you mean i386? Also x86 uses use -march not -mcpu. I don't think -mcpu does anything.