Traditionally, galaxy clusters have been expected to retain all the material accreted since their formation epoch. For this reason, their matter content should be representative of the Universe as a whole, and thus their baryon fraction should be close to the Universal baryon fraction Ω b /Ω m . We make use of the sample of the 100 brightest galaxy clusters discovered in the XXL Survey to investigate the fraction of baryons in the form of hot gas and stars in the cluster population. Since it spans a wide range of mass (10 13 −10 15 M ) and redshift (0.05−1.1) and benefits from a large set of multiwavelength data, the XXL-100-GC sample is ideal for measuring the global baryon budget of massive halos. We measure the gas masses of the detected halos and use a mass-temperature relation directly calibrated using weak-lensing measurements for a subset of XXL clusters to estimate the halo mass. We find that the weak-lensing calibrated gas fraction of XXL-100-GC clusters is substantially lower than was found in previous studies using hydrostatic masses. Our best-fit relation between gas fraction and mass reads f gas,500 = 0.055 +0.007 −0.006 M 500 /10 14 M 0.21 +0.11 −0.10 . The baryon budget of galaxy clusters therefore falls short of the Universal baryon fraction by about a factor of two at r 500,MT . Our measurements require a hydrostatic bias 1 − b = M X /M WL = 0.72 +0.08 −0.07 to match the gas fraction obtained using lensing and hydrostatic equilibrium, which holds independently of the instrument considered. Comparing our gas fraction measurements with the expectations from numerical simulations, we find that our results favour an extreme feedback scheme in which a significant fraction of the baryons are expelled from the cores of halos. This model is, however, in contrast with the thermodynamical properties of observed halos, which might suggest that weak-lensing masses are overestimated. In light of these results, we note that a mass bias 1 − b = 0.58 as required to reconcile Planck cosmic microwave background and cluster counts should translate into an even lower baryon fraction, which poses a major challenge to our current understanding of galaxy clusters.