For our spack env, I've set the default architecture to ivybridge. Note that the actual host I'm building with isn't ivybridge.
I'm now trying to build amber 18 with the intel compiler. Once it was done and I did some smoke testing, it threw illegal instruction errors, so clearly it had not compiled for the ivybridge but something else (most likely the build host).
Rebuilding amber again with full verbose, I found these warnings all throughout:
icc: command line warning #10121: overriding '-march=ivybridge' with '-xHost'"
So the -xHost compiler flag is getting set, and it's overriding the arch flag. At this time, I can't see a solution to this without modifying the configuration files prior to building to remove -xHost.