I will have a team meeting and understand the implication of the recent development on the whole application. I will try to assess if it is possible to deliver the application and release a hotfix later in a couple of weeks after proper testing.
About the deadline, if the deadline is EOD and its a major flaw then I do not see a question of not missing it..it will be missed anyways..
Having assessed the situation, I will inform the project stakeholders on the situation and gain their buy in of a phased delivery if that is feasible. Also, parallely, I will try to do a root cause analysis of how such a bug did not come into notice in the first place