The present application discloses compounds that are inhibitors of Btk, compounds that are inhibitors of PI3Kδ, and compounds that are dual inhibitors of both Btk and PI3Kδ. Also described are methods for synthesizing such inhibitors and methods for using such inhibitors for the treatment of diseases wherein inhibition of Btk and PI3Kδ provides a therapeutic benefit to a patient having the disease.