The Giants did not have to go to their Plan B in the first round of the NFL draft, but they did have one ready if their desired Plan Barkley did not transpire.

For weeks, the Giants were locked in on running back Saquon Barkley and firmly believed they would land him with the second overall pick. But they could not be sure, as noise grew louder that perhaps the Browns, sitting at No. 1, would take Barkley at the top of the draft and then pick whichever quarterback they rated highest waiting for them at No. 4.

If Barkley was gone, the Giants were ready to stay at No. 2 and pivot to the player they liked second-best on their draft board. They would have taken Bradley Chubb, The Post has learned, as they were sold on the North Carolina State defensive end as a premier pass rusher and far and away the top defensive player in this draft.

The Giants would not have gone with a quarterback, as it has been well-documented they did not view any of them as worthy of the No. 2 pick in the draft.

General manager Dave Gettleman certainly values linemen and won two Super Bowls in his first tenure with the Giants, who leaned heavily on a furious defensive-end rotation, subscribing to the theory you can never have enough pass-rushers. The Giants were all-in on Barkley and wanted him badly, but Chubb would have been viewed in the organization as a very strong second option.

The Giants hoped to add badly needed pass-rush help Friday night in the second and third rounds on Day 2 of the draft.

The top player still on the board was Harold Landry of Boston College. Landry owns school records with 26 career sacks and 47.5 tackles for loss. At 252 pounds, he fits as an outside linebacker in defensive coordinator James Bettcher’s 3-4 front.

There are several offensive linemen for the Giants to consider, as they own the 34th overall pick, selecting second in the second round, behind the Browns.

It should not be forgotten after the Giants acquired Eli Manning in the 2004 draft, they selected guard Chris Snee in the second round — with the 34th overall pick. Snee went on to become one of the best offensive linemen in franchise history.

The Giants for some time have been eyeing guard Will Hernandez of Texas-El Paso but expected him to be taken in the first round. To their great delight, he was not and will be there at No. 34, unless the Browns scoop him up. Another option is Braden Smith, who at 6-foot-6 and 315 pounds has the size to be a right tackle, although he started for four years at Auburn mostly at guard.

With so much uncertainty as far as Ereck Flowers ever returning, right tackle is an area of need, and Connor Williams of Texas is one of the top tackles in this draft.