to amend, you must prepare a correct tax return.
The correct tax return will include correct form(s) 8949 and a Schedule D that reflects that.
Send the corrected forms with your form 1040X
Do not include your old 1040 nor your revised 1040 because the Form 1040X reflects any changes there and becomes your new tax return.