I am seeking help from the community as to what constitutes as earned income for Roth IRA contribution. I am a resident alien who is able to claim tax treaty exemption under the "exception to the saving clause." For 2020, I received part of my income on W-2, but another part on 1042-S, due to me claiming the tax treaty exemption. I am under the 12.4k standard deductions anyways, so I do not need to pay taxes on the W-2 portion.
I'd like to know whether I can only use my W-2 amount to contribute to Roth IRA or the combined W-2 + 1042-S amount. Wordings on IRS says that only earned income, wages, tips, and other taxable earnings could be used for an IRA, but my 1042-S (though not taxable?) is still a wage. Thanks.